diff options
| author | Paulo Alcantara <pc@manguebit.org> | 2026-11-11 11:59:52 -0300 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-11-11 13:51:10 -0300 |
| commit | 25912ed3b75dcf5ff623dcb549b925dd0d0948f7 (patch) | |
| tree | 5f0d97822249147c5df10f393c01a929c9a9c6de /rust/kernel/alloc/kvec | |
| parent | fce78321f1b59531cf6fc94860550db1db8dec55 (diff) | |
smb: client: flush deferred handles of other names before a hard link open
Opening a hard link of a file whose other name still holds a deferred,
leased handle fails with EINVAL over SMB3. The client caches lease keys
per inode, but the server ties a lease to the file name it was granted
under, so reusing the inode's lease key to open a different name of the
same inode is rejected with STATUS_INVALID_PARAMETER (MS-SMB2 3.3.5.9.11).
Commit 262b73ef442e ("smb3 client: fix open hardlink on deferred close
file error") already closes the inode's deferred handles before such an
open so the new name can take a fresh lease, but cifs_get_hardlink_path()
only triggered that flush when a cached handle had the same open flags as
the new open, so a differently accessed name - written then read, say -
slipped through and still failed.
Match on the name instead: flush when a cached handle for another name of
the inode is open, regardless of access mode.
Reported-by: Giuseppe Piscitelli <ooonea@gmail.com>
Closes: https://lore.kernel.org/r/CACmoRBbDZR3eyEM65j73sWMS7A=T89z1QAvCP=+u0WGzZhwW6g@mail.gmail.com
Fixes: 262b73ef442e ("smb3 client: fix open hardlink on deferred close file error")
Cc: stable@vger.kernel.org
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions
