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:33:03 +0900
committerSteve French <stfrench@microsoft.com>2026-06-22 20:15:05 -0500
commit166e4c07023b9c5d076f69e63164b6e1d52709c9 (patch)
tree9e01b94a2f0c3d1485513804a5df01067687ea68 /scripts/sbom/git@git.tavy.me:linux-stable.git
parenta04159d96c27fd4836538ea6e8ff653b65242eac (diff)
ksmbd: supersede disconnected delete-on-close durable handle
A durable handle opened with FILE_DELETE_ON_CLOSE is preserved across a disconnect so it can be reclaimed by a durable reconnect. smb2.durable-open.delete_on_close2 disconnects such a handle and then reconnects it, expecting the reconnect to succeed. When the client does not reconnect but instead opens the same name with a new delete-on-close create, the preserved handle keeps the file present with delete-on-close set. ksmbd then rejects the new open with STATUS_ACCESS_DENIED on the file_present + FILE_DELETE_ON_CLOSE + OPEN_IF/OVERWRITE_IF path. smb2.durable-open.delete_on_close1 expects this open to create a fresh, empty file instead, i.e. the disconnected handle's delete-on-close must take effect first. Add ksmbd_close_disconnected_durable_delete_on_close(), which closes disconnected (conn == NULL) durable handles that keep a delete-on-close file present. The final close promotes S_DEL_ON_CLS to S_DEL_PENDING and unlinks the file, so a re-resolved path is absent and the new open creates it fresh. Call it from smb2_open() before the delete-on-close conflict check, only for the conflicting open shapes. A live (connected) handle still keeps the file and blocks the open as before. 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