diff options
| author | Ze Tan <tanze@kylinos.cn> | 2026-08-14 13:51:44 +0000 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-08-17 22:38:27 +0900 |
| commit | 7de5cf9bcf96bf2ee2ea2ad1d35a7b950f71161a (patch) | |
| tree | 95a934ca78cca9b7f0057d9eae33c560ca2ce464 /scripts/patch-kernel | |
| parent | 492b24b5b651a72ee83a8d481f70246b36192832 (diff) | |
| download | linux-7de5cf9bcf96bf2ee2ea2ad1d35a7b950f71161a.tar.gz linux-7de5cf9bcf96bf2ee2ea2ad1d35a7b950f71161a.zip | |
smb/server: fix session counter on session removal
See the procedure below:
smb2_sess_setup
ksmbd_smb2_session_create
__session_create
hash_add(sessions_table, &sess->hlist, sess->id)
ksmbd_counter_inc(KSMBD_COUNTER_SESSIONS)
ksmbd_conn_handler_loop
ksmbd_server_terminate_conn
ksmbd_sessions_deregister
hash_del(&sess->hlist)
// do not decrement KSMBD_COUNTER_SESSIONS
KSMBD_COUNTER_SESSIONS tracks sessions published in sessions_table, but
session removal does not decrement it. The value therefore keeps growing
after sessions are expired, rejected during registration, or removed on
the last channel disconnect.
Fixes: b38f99c1217a ("ksmbd: add procfs interface for runtime monitoring and statistics")
Signed-off-by: Ze Tan <tanze@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
