> On Oct 6, 2021, at 1:20 PM, Benjamin Coddington <bcodding@xxxxxxxxxx> wrote: > > Why V2: further testing to verify INET6 handling, fix spelling mistakes > > 8<------------------------------------------------------------------------ > > 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@xxxxxxxxxx> Thanks, applied to the for-next topic branch at git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git > --- > fs/nfsd/nfsctl.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c > index c2c3d9077dc5..696a217255fc 100644 > --- a/fs/nfsd/nfsctl.c > +++ b/fs/nfsd/nfsctl.c > @@ -793,7 +793,10 @@ static ssize_t __write_ports_addxprt(char *buf, struct net *net, const struct cr > svc_xprt_put(xprt); > } > out_err: > - nfsd_destroy(net); > + if (!list_empty(&nn->nfsd_serv->sv_permsocks)) > + nn->nfsd_serv->sv_nrthreads--; > + else > + nfsd_destroy(net); > return err; > } > > -- > 2.30.2 > -- Chuck Lever