summaryrefslogtreecommitdiffstats
path: root/fs/ksmbd/connection.h
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2022-07-25 13:36:52 +0900
committerSteve French <stfrench@microsoft.com>2022-07-31 23:14:32 -0500
commitaf7c39d971e43cd0af488729bca362427ad99488 (patch)
tree3c174aa7d504f663a6741a5dffee77666f86df65 /fs/ksmbd/connection.h
parenta14c573870a664386adc10526a6c2648ea56dae1 (diff)
downloadlinux-af7c39d971e43cd0af488729bca362427ad99488.tar.bz2
ksmbd: fix racy issue while destroying session on multichannel
After multi-channel connection with windows, Several channels of session are connected. Among them, if there is a problem in one channel, Windows connects again after disconnecting the channel. In this process, the session is released and a kernel oop can occurs while processing requests to other channels. When the channel is disconnected, if other channels still exist in the session after deleting the channel from the channel list in the session, the session should not be released. Finally, the session will be released after all channels are disconnected. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/connection.h')
-rw-r--r--fs/ksmbd/connection.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/ksmbd/connection.h b/fs/ksmbd/connection.h
index 2e4730457c92..e7f7d5707951 100644
--- a/fs/ksmbd/connection.h
+++ b/fs/ksmbd/connection.h
@@ -20,13 +20,6 @@
#define KSMBD_SOCKET_BACKLOG 16
-/*
- * WARNING
- *
- * This is nothing but a HACK. Session status should move to channel
- * or to session. As of now we have 1 tcp_conn : 1 ksmbd_session, but
- * we need to change it to 1 tcp_conn : N ksmbd_sessions.
- */
enum {
KSMBD_SESS_NEW = 0,
KSMBD_SESS_GOOD,