Skip to content
Commit cc630d9f authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

svcrpc: fix rpc server shutdown races



Rewrite server shutdown to remove the assumption that there are no
longer any threads running (no longer true, for example, when shutting
down the service in one network namespace while it's still running in
others).

Do that by doing what we'd do in normal circumstances: just CLOSE each
socket, then enqueue it.

Since there may not be threads to handle the resulting queued xprts,
also run a simplified version of the svc_recv() loop run by a server to
clean up any closed xprts afterwards.

Cc: stable@kernel.org
Tested-by: default avatarJason Tibbitts <tibbs@math.uh.edu>
Tested-by: default avatarPaweł Sikora <pawel.sikora@agmk.net>
Acked-by: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent e75bafbf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment