projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e506649
)
cifsd: fix wrong use of rw semaphore in __session_create()
author
Namjae Jeon
<namjae.jeon@samsung.com>
Tue, 30 Mar 2021 03:38:03 +0000
(12:38 +0900)
committer
Steve French
<stfrench@microsoft.com>
Tue, 11 May 2021 00:15:27 +0000
(19:15 -0500)
Adding list to session table should be protected by
down_write/up_write().
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifsd/mgmt/user_session.c
patch
|
blob
|
history
diff --git
a/fs/cifsd/mgmt/user_session.c
b/fs/cifsd/mgmt/user_session.c
index
afcdf76
..
1b71a20
100644
(file)
--- a/
fs/cifsd/mgmt/user_session.c
+++ b/
fs/cifsd/mgmt/user_session.c
@@
-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;