android_kernel_samsung_sm8650/include/linux/lockd
Jeff Layton 41a68444e5 lockd: set file_lock start and end when decoding nlm4 testargs
commit 7ff84910c66c9144cc0de9d9deed9fb84c03aff0 upstream.

Commit 6930bcbfb6 dropped the setting of the file_lock range when
decoding a nlm_lock off the wire. This causes the client side grant
callback to miss matching blocks and reject the lock, only to rerequest
it 30s later.

Add a helper function to set the file_lock range from the start and end
values that the protocol uses, and have the nlm_lock decoder call that to
set up the file_lock args properly.

Fixes: 6930bcbfb6 ("lockd: detect and reject lock arguments that overflow")
Reported-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Amir Goldstein <amir73il@gmail.com>
Cc: stable@vger.kernel.org #6.0
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-30 12:49:23 +02:00
..
bind.h Keep read and write fds with each nlm_file 2021-08-23 18:05:31 -04:00
debug.h
lockd.h NLM: Defend against file_lock changes after vfs_test_lock() 2022-07-29 20:08:56 -04:00
nlm.h
share.h
xdr4.h lockd: set file_lock start and end when decoding nlm4 testargs 2023-03-30 12:49:23 +02:00
xdr.h lockd: detect and reject lock arguments that overflow 2022-08-04 10:28:48 -04:00