diff options
| author | Bjoern Doebel <doebel@amazon.de> | 2026-09-04 10:42:36 +0000 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-09-05 13:54:01 -0300 |
| commit | 23b26f4408ac3f35a482d2e5cf6fc865d4201b71 (patch) | |
| tree | 0791044ffbf2cddf8ccae02b304743b1e5d0e17d /scripts/basic/split-include.c | |
| parent | 9f2e63f1b2d5fc5b5423424902c091123e220e7e (diff) | |
| download | linux-23b26f4408ac3f35a482d2e5cf6fc865d4201b71.tar.gz linux-23b26f4408ac3f35a482d2e5cf6fc865d4201b71.zip | |
smb: client: avoid leaking refcount when cifs_sb_tlink() fails
cifs_oplock_break() takes over the reference that
cifs_queue_oplock_break() acquired when it queued the work, and drops it
with _cifsFileInfo_put() once the break has been processed.
Only in setups with "-o multiuser", cifs_sb_tlink() may fail, at which
point cifs_oplock_break() returns without putting the file reference,
mirroring the reference leak we already fixed in the companion patch to
cifs_queue_oplock_break().
This would trigger a crash due to busy inodes on the next unmount:
BUG: Dentry ... still in use (1) [unmount of cifs cifs]
VFS: Busy inodes after unmount of cifs (cifs)
Drop the reference on that path as well. Doing so before the out label
mirrors the normal path, which also puts the reference before
cifs_done_oplock_break().
Found by Sashiko code review. The failure path was not exercised at
runtime.
Fixes: e8f5f849ffce2 ("cifs: fix potential oops in cifs_oplock_break")
Cc: stable@vger.kernel.org
Assisted-by: Kiro:claude-opus-5
Signed-off-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
