linux-stable/fs/smb
Paulo Alcantara 24b9ed739c smb: client: fix race with concurrent opens in rename(2)
[ Upstream commit d84291fc74 ]

Besides sending the rename request to the server, the rename process
also involves closing any deferred close, waiting for outstanding I/O
to complete as well as marking all existing open handles as deleted to
prevent them from deferring closes, which increases the race window
for potential concurrent opens on the target file.

Fix this by unhashing the dentry in advance to prevent any concurrent
opens on the target.

Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-09-04 15:30:19 +02:00
..
client smb: client: fix race with concurrent opens in rename(2) 2025-09-04 15:30:19 +02:00
common smb: smbdirect: add smbdirect_socket.h 2025-08-15 12:09:04 +02:00
server smb: server: split ksmbd_rdma_stop_listening() out of ksmbd_rdma_destroy() 2025-08-28 16:28:44 +02:00
Kconfig
Makefile