]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: Keep existing listeners on portlist error
authorBenjamin Coddington <bcodding@redhat.com>
Wed, 6 Oct 2021 17:20:44 +0000 (13:20 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Oct 2021 07:54:25 +0000 (09:54 +0200)
commit687f8e22e0fb3aa0a3afa7286dcee099d61390ff
treecc3371419abd3df494928297e4c7c641f43a2c04
parent15fa3e8b9d6e6d1ea039c44bb511420fa9ba4cf4
NFSD: Keep existing listeners on portlist error

[ Upstream commit 89a41e98400537fa96adf9497e1853fdaee531a5 ]

If nfsd has existing listening sockets without any processes, then an error
returned from svc_create_xprt() for an additional transport will remove
those existing listeners.  We're seeing this in practice when userspace
attempts to create rpcrdma transports without having the rpcrdma modules
present before creating nfsd kernel processes.  Fix this by checking for
existing sockets before calling nfsd_destroy().

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfsctl.c