]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: do not grant v2 lease if parent lease key and epoch are not set
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 1 May 2024 12:58:15 +0000 (21:58 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:15:09 +0000 (12:15 +0200)
commit209e25da5f66b4f08a3ac0aa738a27265519a97a
tree0c9488d4cac87e4169040d9ce9dfef195cd4c52a
parentce7711a27f1b9df9faa25ed42ddefc8c5c58f4fe
ksmbd: do not grant v2 lease if parent lease key and epoch are not set

commit 691aae4f36f9825df6781da4399a1e718951085a upstream.

This patch fix xfstests generic/070 test with smb2 leases = yes.

cifs.ko doesn't set parent lease key and epoch in create context v2 lease.
ksmbd suppose that parent lease and epoch are vaild if data length is
v2 lease context size and handle directory lease using this values.
ksmbd should hanle it as v1 lease not v2 lease if parent lease key and
epoch are not set in create context v2 lease.

Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/server/oplock.c