sunrpc: don't call sleeping functions from the notifier block callbacks
authorScott Mayhew <smayhew@redhat.com>
Thu, 5 Jan 2017 21:34:51 +0000 (16:34 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jan 2017 07:24:37 +0000 (08:24 +0100)
commita297ed84b92846963b4a7c5efd90910cea9c39a5
tree15118ca8f83beab3fcaccd390f965db5bca834b5
parent90687fc3c8c386a16326089d68cf616b8049440f
sunrpc: don't call sleeping functions from the notifier block callbacks

commit 546125d1614264d26080817d0c8cddb9b25081fa upstream.

The inet6addr_chain is an atomic notifier chain, so we can't call
anything that might sleep (like lock_sock)... instead of closing the
socket from svc_age_temp_xprts_now (which is called by the notifier
function), just have the rpc service threads do it instead.

Fixes: c3d4879e01be "sunrpc: Add a function to close..."
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/sunrpc/svc_xprt.h
net/sunrpc/svc_xprt.c