kernel_samsung_a53x/fs/lockd
Jeff Layton b3c26d143d lockd: set file_lock start and end when decoding nlm4 testargs
[ Upstream commit 7ff84910c66c9144cc0de9d9deed9fb84c03aff0 ]

Commit 6930bcbfb6ce 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: 6930bcbfb6ce ("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: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:28:31 +01:00
..
clnt4xdr.c lockd: set file_lock start and end when decoding nlm4 testargs 2024-11-19 12:28:31 +01:00
clntlock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clntproc.c SUNRPC: Trace calls to .rpc_call_done 2024-11-19 12:27:47 +01:00
clntxdr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
host.c lockd: move from strlcpy with unused retval to strscpy 2024-11-19 12:28:21 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netns.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
procfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
procfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
svc.c NFSD: Move svc_serv_ops::svo_function into struct svc_serv 2024-11-19 12:27:54 +01:00
svc4proc.c lockd: set missing fl_flags field when retrieving args 2024-11-19 12:28:28 +01:00
svclock.c lockd: fix file selection in nlmsvc_cancel_blocked 2024-11-19 12:28:28 +01:00
svcproc.c lockd: set missing fl_flags field when retrieving args 2024-11-19 12:28:28 +01:00
svcshare.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
svcsubs.c lockd: set other missing fields when unlocking files 2024-11-19 12:28:28 +01:00
svcxdr.h NLM: Fix svcxdr_encode_owner() 2024-11-19 12:27:45 +01:00
xdr.c SUNRPC: Change return value type of .pc_encode 2024-11-19 12:27:48 +01:00
xdr4.c lockd: set file_lock start and end when decoding nlm4 testargs 2024-11-19 12:28:31 +01:00