diff options
| author | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-16 23:17:58 +0900 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-21 08:55:34 +0900 |
| commit | add8d7fb04efe564193df73581889c62fc0016f1 (patch) | |
| tree | 44ec4995c312cfd930887d0338b7dd198da5eb4d /scripts/Makefile.thinlto | |
| parent | b4bae7af1154089be87c7475218264fcbfd16d10 (diff) | |
| download | linux-add8d7fb04efe564193df73581889c62fc0016f1.tar.gz linux-add8d7fb04efe564193df73581889c62fc0016f1.zip | |
ksmbd: hold a connection reference for each session channel
ksmbd_session_unregister() removes a session from the global and per-
connection tables before dropping the table reference. A concurrent
reference holder can keep the session and its channel list alive after
those removals.
Connection cleanup can no longer find the unpublished session to remove its
channels. Since a channel only stores a raw conn pointer, the connection
can be freed while another session reference holder is still accessing it,
for example during SMB3.1.1 binding or a procfs read.
Take a connection reference when registering a channel and release it on
insertion failure, channel removal, or final session destruction. Keep the
channels and signing keys until the session is destroyed so a response can
still be signed after the session has been unregistered.
Fixes: d7fd1f98607f ("ksmbd: follow SMB2 session expiration semantics")
Cc: stable@vger.kernel.org
Reported-by: Abdifatah Suruur <suruurism@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
