]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lockd: fix server crash on reboot of client holding lock
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 18 Jan 2022 22:00:16 +0000 (17:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Feb 2022 11:39:55 +0000 (12:39 +0100)
commit75fe271b2f41352a028d3c4a528decd6ea098bc8
tree4a7b5a5dbe54fb8c2578d5a21651ff3ebebcade3
parent20842a8d93e3a595dbb49038588e4c994a500ccb
lockd: fix server crash on reboot of client holding lock

commit 6e7f90d163afa8fc2efd6ae318e7c20156a5621f upstream.

I thought I was iterating over the array when actually the iteration is
over the values contained in the array?

Ugh, keep it simple.

Symptoms were a null deference in vfs_lock_file() when an NFSv3 client
that previously held a lock came back up and sent a notify.

Reported-by: Jonathan Woithe <jwoithe@just42.net>
Fixes: 7f024fcd5c97 ("Keep read and write fds with each nlm_file")
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/lockd/svcsubs.c