提交 69f447be 编写于 作者: N Namjae Jeon 提交者: Steve French

cifsd: fix wrong use of rw semaphore in __session_create()

Adding list to session table should be protected by
down_write/up_write().
Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 e5066499
......@@ -298,9 +298,9 @@ static struct ksmbd_session *__session_create(int protocol)
goto error;
if (protocol == CIFDS_SESSION_FLAG_SMB2) {
down_read(&sessions_table_lock);
down_write(&sessions_table_lock);
hash_add(sessions_table, &sess->hlist, sess->id);
up_read(&sessions_table_lock);
up_write(&sessions_table_lock);
}
return sess;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册