Skip to content
Commit 7ff84910 authored by Jeff Layton's avatar Jeff Layton Committed by Anna Schumaker
Browse files

lockd: set file_lock start and end when decoding nlm4 testargs

Commit 6930bcbf 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: 6930bcbf

 ("lockd: detect and reject lock arguments that overflow")
Reported-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Tested-by: default avatarAmir Goldstein <amir73il@gmail.com>
Cc: stable@vger.kernel.org #6.0
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 9c88ea00
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment