linux-stable/fs/lockd
J. Bruce Fields efda760fe9 lockd: fix lockd shutdown race
As reported by David Jeffery: "a signal was sent to lockd while lockd
was shutting down from a request to stop nfs.  The signal causes lockd
to call restart_grace() which puts the lockd_net structure on the grace
list.  If this signal is received at the wrong time, it will occur after
lockd_down_net() has called locks_end_grace() but before
lockd_down_net() stops the lockd thread.  This leads to lockd putting
the lockd_net structure back on the grace list, then exiting without
anything removing it from the list."

So, perform the final locks_end_grace() from the the lockd thread; this
ensures it's serialized with respect to restart_grace().

Reported-by: David Jeffery <djeffery@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2017-05-08 18:06:18 -04:00
..
clnt4xdr.c nfsd: remove <linux/nfsd/nfsfh.h> 2014-05-06 17:54:53 -04:00
clntlock.c LOCKD: Don't call utsname()->nodename from nlmclnt_setlockargs 2013-08-05 15:03:46 -04:00
clntproc.c Move locks API users to locks_lock_inode_wait() 2015-10-22 14:57:36 -04:00
clntxdr.c nfsd: remove <linux/nfsd/nfsfh.h> 2014-05-06 17:54:53 -04:00
host.c lockd: get rid of reference-counted NSM RPC clients 2015-10-23 15:57:27 -04:00
Makefile lockd: add a /proc/fs/lockd/nlm_end_grace file 2014-09-17 16:33:13 -04:00
mon.c lockd: get rid of reference-counted NSM RPC clients 2015-10-23 15:57:27 -04:00
netns.h netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
procfs.c drop redundant ->owner initializations 2016-05-29 19:08:00 -04:00
procfs.h treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
svc.c lockd: fix lockd shutdown race 2017-05-08 18:06:18 -04:00
svc4proc.c lockd: create NSM handles per net namespace 2015-10-12 17:31:05 -04:00
svclock.c lockd: remove redundant check on block 2017-04-25 17:25:56 -04:00
svcproc.c lockd: create NSM handles per net namespace 2015-10-12 17:31:05 -04:00
svcshare.c
svcsubs.c nfsd: eliminate NFSD_DEBUG 2015-04-21 16:16:02 -04:00
xdr.c lockd: xdr: Remove unused function 2015-01-15 13:46:27 -05:00
xdr4.c lockd: Introduce new-style XDR functions for NLMv4 2010-12-16 12:37:23 -05:00