]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
clnt_vc.c: Replace msleep() with pause() to avoid assert panic
authorRick Macklem <rmacklem@FreeBSD.org>
Fri, 14 Oct 2022 22:46:55 +0000 (15:46 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Fri, 14 Oct 2022 22:46:55 +0000 (15:46 -0700)
commit82512c17ea39fcc272483024cb55d567dfd55366
tree061bdfa900843d032e00d63471dab21988172551
parentba7319e9091b4f6ef15a9c4be3d3d076f3047f72
clnt_vc.c: Replace msleep() with pause() to avoid assert panic

An msleep() in clnt_vc.c used a global "fake_wchan" wchan argument
along with the mutex in a CLIENT structure.  As such, it was
possible to use different mutexes for the same wchan and
cause a panic assert.  Since this is in a rarely executed code
path, the assert panic was only recently observed.

Since "fake_wchan" never gets a wakeup, this msleep() can
be replaced with a pause() to avoid the panic assert,
which is what this patch does.

Reviewed by: kib, markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36977
sys/rpc/clnt_vc.c