mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
ksmbd: scope session state changes to bound connections
ksmbd_all_conn_set_status() treats every connection whose transient binding flag is set as belonging to the target SessionId. A logoff or session replacement can consequently move an unrelated connection to NEED_RECONNECT or NEED_SETUP. Pass the target session itself and select connections using either the connection-local session xarray or the session's permanent channel list. Use the same association test while waiting for requests to drain. Serialize session-wide status changes under request_lock and do not overwrite EXITING or RELEASING. Protect the shutdown transition with the same lock so a concurrent session update cannot revive a closing connection. Fixes:f5a544e3ba("ksmbd: add support for SMB3 multichannel") Fixes:abcc506a9a("ksmbd: fix racy issue from smb2 close and logoff with multichannel") Fixes:c444139cb7("ksmbd: rewrite stop_sessions() with restartable iteration") Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
2cbd4a8bf4
commit
c50e628122
4 changed files with 41 additions and 16 deletions
Loading…
Add table
Add a link
Reference in a new issue