Skip to content
Commit bb4f791c authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

nfsd: call nfsd_last_thread() before final nfsd_put()

[ Upstream commit 2a501f55 ]

If write_ports_addfd or write_ports_addxprt fail, they call nfsd_put()
without calling nfsd_last_thread().  This leaves nn->nfsd_serv pointing
to a structure that has been freed.

So remove 'static' from nfsd_last_thread() and call it when the
nfsd_serv is about to be destroyed.

Fixes: ec52361d

 ("SUNRPC: stop using ->sv_nrthreads as a refcount")
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 03d68ffc
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