summaryrefslogtreecommitdiff
path: root/scripts/sbom/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2026-06-21 19:48:27 +0900
committerSteve French <stfrench@microsoft.com>2026-06-22 20:15:05 -0500
commit7db0da9915fdfd40156d01f20faac08f040fcfa3 (patch)
tree3787ef029988c41ef5f3f5e7ec9babb1687fc172 /scripts/sbom/git@git.tavy.me:linux-stable.git
parentba3cf6ee4f0eacc1f8c607b80188e3b32ef5e0e3 (diff)
ksmbd: downgrade oplock after break timeout
smb2.oplock.batch22a opens a file with a batch oplock and then issues a second open that waits for the oplock break timeout. After the timeout the second open should succeed, but the granted oplock level must be level II. When the break times out, oplock_break() returns -ENOENT after invalidating the previous opener. smb_grant_oplock() went straight to set_lev with the original requested oplock level, so the second open could be granted a new batch oplock. Downgrade the requested oplock to level II on the -ENOENT break-timeout path before granting the oplock to the new open. A break that completes because the previous owner closed its handle from the oplock break handler must be distinguished from a real timeout. smb2.oplock.batch7 closes the first handle during the break wait, and the second open is then expected to be granted the originally requested batch oplock. Return -EAGAIN from the non-lease break path when the previous opener closed during the break wait, recheck sharing in smb_grant_oplock(), and grant the requested oplock if the close removed the conflict. Real break timeouts still return -ENOENT and keep the downgrade to level II. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'scripts/sbom/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions