diff options
author | J. Bruce Fields <bfields@redhat.com> | 2017-03-28 21:25:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-13 19:47:53 +0200 |
commit | 75d34f1c60072a8d4e9cb1905c32272f23f6dcef (patch) | |
tree | abd403aa6de6b28ddff1f08cb0894fcf75f6d9cb /drivers/misc | |
parent | 988ef9c8c29ccc9949a18b599df463ebd653daef (diff) | |
download | linux-rt-75d34f1c60072a8d4e9cb1905c32272f23f6dcef.tar.gz |
lockd: fix lockd shutdown race
[ Upstream commit efda760fe95ea15291853c8fa9235c32d319cd98 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
0 files changed, 0 insertions, 0 deletions