summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorNaofumi Honda <honda@math.sci.hokudai.ac.jp>2017-11-09 10:57:16 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-05 11:24:32 +0100
commitaa1a6cf1586bb0aa7c6585ebaffd7b5e3ae4f040 (patch)
tree91e3902f4cf7b1f1b893ce838764a8db68cf4729 /fs/nfsd
parent1c404259164405f9a61379285f6e1fcb57ea43aa (diff)
downloadlinux-stable-aa1a6cf1586bb0aa7c6585ebaffd7b5e3ae4f040.tar.gz
linux-stable-aa1a6cf1586bb0aa7c6585ebaffd7b5e3ae4f040.tar.bz2
linux-stable-aa1a6cf1586bb0aa7c6585ebaffd7b5e3ae4f040.zip
nfsd: fix panic in posix_unblock_lock called from nfs4_laundromat
commit 64ebe12494fd5d193f014ce38e1fd83cc57883c8 upstream. From kernel 4.9, my two nfsv4 servers sometimes suffer from "panic: unable to handle kernel page request" in posix_unblock_lock() called from nfs4_laundromat(). These panics diseappear if we revert the commit "nfsd: add a LRU list for blocked locks". The cause appears to be a typo in nfs4_laundromat(), which is also present in nfs4_state_shutdown_net(). Fixes: 7919d0a27f1e "nfsd: add a LRU list for blocked locks" Cc: jlayton@redhat.com Reveiwed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 7161913cdaeb..9ebb2d7c8182 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4732,7 +4732,7 @@ nfs4_laundromat(struct nfsd_net *nn)
spin_unlock(&nn->blocked_locks_lock);
while (!list_empty(&reaplist)) {
- nbl = list_first_entry(&nn->blocked_locks_lru,
+ nbl = list_first_entry(&reaplist,
struct nfsd4_blocked_lock, nbl_lru);
list_del_init(&nbl->nbl_lru);
posix_unblock_lock(&nbl->nbl_lock);
@@ -7143,7 +7143,7 @@ nfs4_state_shutdown_net(struct net *net)
spin_unlock(&nn->blocked_locks_lock);
while (!list_empty(&reaplist)) {
- nbl = list_first_entry(&nn->blocked_locks_lru,
+ nbl = list_first_entry(&reaplist,
struct nfsd4_blocked_lock, nbl_lru);
list_del_init(&nbl->nbl_lru);
posix_unblock_lock(&nbl->nbl_lock);