diff options
| author | ZhangGuoDong <zhangguodong@kylinos.cn> | 2025-10-12 00:51:36 +0800 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-10-15 06:03:09 -0500 |
| commit | 379510a815cb2e64eb0a379cb62295d6ade65df0 (patch) | |
| tree | 3c9452823238459708a9bc60a7b1a6abc0943531 | |
| parent | smb/server: fix possible memory leak in smb2_read() (diff) | |
| download | linux-379510a815cb2e64eb0a379cb62295d6ade65df0.tar.gz linux-379510a815cb2e64eb0a379cb62295d6ade65df0.zip | |
smb/server: fix possible refcount leak in smb2_sess_setup()
Reference count of ksmbd_session will leak when session need reconnect.
Fix this by adding the missing ksmbd_user_session_put().
Co-developed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: ZhangGuoDong <zhangguodong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
| -rw-r--r-- | fs/smb/server/smb2pdu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index e81e615f322a..b731d9b09408 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -1806,6 +1806,7 @@ int smb2_sess_setup(struct ksmbd_work *work) if (ksmbd_conn_need_reconnect(conn)) { rc = -EFAULT; + ksmbd_user_session_put(sess); sess = NULL; goto out_err; } |
