]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r335866
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 30 Jul 2018 19:29:31 +0000 (19:29 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 30 Jul 2018 19:29:31 +0000 (19:29 +0000)
commit115569074bbc392dea2d53fec89203427e5e54ac
treebf97665c26044439031f98f86a00cbd116de9990
parentbf50bc033b52a606754c628278afcbd80a750fc1
MFC: r335866
Fix the server side krpc so that the kernel nfsd threads terminate.

Occationally the kernel nfsd threads would not terminate when a SIGKILL
was posted for the kernel process (called nfsd (slave)). When this occurred,
the thread associated with the process (called "ismaster") had returned from
svc_run_internal() and was sleeping waiting for the other threads to terminate.
The other threads (created by kthread_start()) were still in svc_run_internal()
handling NFS RPCs.
The only way this could occur is for the "ismaster" thread to return from
svc_run_internal() without having called svc_exit().
There was only one place in the code where this could happen and this patch
stops that from happening.
Since the problem is intermittent, I cannot be sure if this has fixed the
problem, but I have not seen an occurrence of the problem with this patch
applied.

git-svn-id: svn://svn.freebsd.org/base/stable/10@336928 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/rpc/svc.c