linux/fs/smb
Frank Sorenson 19465a9aeb smb: client: split cifsFileInfo bitfields to avoid shared-byte RMW races
The invalidHandle, swapfile, oplock_break_cancelled, offload,
and status_file_deleted fields are stored in the same bitfield byte
in struct cifsFileInfo, but are updated in different code paths that
may run simultaneously, and are protected by different locks.  Since
bitfield assignments generate byte-level read-modify-write operations,
a modification to one flag can overwrite a concurrent modification to
another flag.

To avoid these races, convert these flags from a bitfield to
separate bool fields.

Closes: https://lore.kernel.org/r/7689764e-c0f6-4016-9557-b54cf4a3de4e@redhat.com
Fixes: 3bc303c254 ("cifs: convert oplock breaks to use slow_work facility (try #4)")
Fixes: 4e8aea30f7 ("smb3: enable swap on SMB3 mounts")
Fixes: ffceb7640c ("smb: client: do not defer close open handles to deleted files")
Fixes: 173217bd73 ("smb3: retrying on failed server close")
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
2026-09-30 23:17:30 -03:00
..
client smb: client: split cifsFileInfo bitfields to avoid shared-byte RMW races 2026-09-30 23:17:30 -03:00
common ksmbd: add SMB Direct RDMA encryption transform 2026-08-17 22:38:25 +09:00
server ksmbd: keep compound responses on query info errors 2026-09-15 22:28:52 +09:00
smbdirect This contains a set of 142 SMB server updates focused on SMB2 command 2026-08-23 08:41:36 -07:00
Kconfig smb: smbdirect: move fs/smb/common/smbdirect/ to fs/smb/smbdirect/ 2026-04-22 19:00:41 -05:00
Makefile smb: smbdirect: move fs/smb/common/smbdirect/ to fs/smb/smbdirect/ 2026-04-22 19:00:41 -05:00