]> git.hungrycats.org Git - linux/commit
NFSd: set nfsd_serv to NULL after service destruction
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Tue, 3 Jul 2012 12:46:41 +0000 (16:46 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:40:01 +0000 (10:40 -0700)
commite116de8f0cba1231b545eb982d1f73be68dacd38
tree35ee1275d0f1188a6f18c6d1b28e0599d7d9d329
parentea8c40cf20877a61e211853e0425bc808344e881
NFSd: set nfsd_serv to NULL after service destruction

commit 57c8b13e3cd0f94944c9691ce7f58e5fcef8a12d upstream.

In nfsd_destroy():

if (destroy)
svc_shutdown_net(nfsd_serv, net);
svc_destroy(nfsd_server);

svc_shutdown_net(nfsd_serv, net) calls nfsd_last_thread(), which sets
nfsd_serv to NULL, causing a NULL dereference on the following line.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfsd.h
fs/nfsd/nfssvc.c