diff options
| author | Guenter Roeck <linux@roeck-us.net> | 2026-02-26 21:54:21 -0800 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-03-08 21:28:38 -0500 |
| commit | c15e7c62feb3751cbdd458555819df1d70374890 (patch) | |
| tree | f931a00ab1f7a47bd7b3c9d416d81b7e080a836d /tools/perf/scripts/python/syscall-counts.py | |
| parent | 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681 (diff) | |
| download | linux-c15e7c62feb3751cbdd458555819df1d70374890.tar.gz linux-c15e7c62feb3751cbdd458555819df1d70374890.zip | |
smb/server: Fix another refcount leak in smb2_open()
If ksmbd_override_fsids() fails, we jump to err_out2. At that point, fp is
NULL because it hasn't been assigned dh_info.fp yet, so ksmbd_fd_put(work,
fp) will not be called. However, dh_info.fp was already inserted into the
session file table by ksmbd_reopen_durable_fd(), so it will leak in the
session file table until the session is closed.
Move fp = dh_info.fp; ahead of the ksmbd_override_fsids() check to fix the
problem.
Found by an experimental AI code review agent at Google.
Fixes: c8efcc786146a ("ksmbd: add support for durable handles v1/v2")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions
