projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a9cbdd
)
smb3: add credits we receive from oplock/break PDUs
author
Ronnie Sahlberg
<
[email protected]
>
Wed, 23 Jan 2019 06:20:38 +0000
(16:20 +1000)
committer
Steve French
<
[email protected]
>
Thu, 24 Jan 2019 20:52:06 +0000
(14:52 -0600)
Otherwise we gradually leak credits leading to potential
hung session.
Signed-off-by: Ronnie Sahlberg <
[email protected]
>
CC: Stable <
[email protected]
>
Reviewed-by: Pavel Shilovsky <
[email protected]
>
Signed-off-by: Steve French <
[email protected]
>
fs/cifs/smb2misc.c
patch
|
blob
|
history
diff --git
a/fs/cifs/smb2misc.c
b/fs/cifs/smb2misc.c
index 6a9c47541c53d0983a068703106ddacdbc834e04..7b8b58fb4d3fbdcf898d306a585c7332cd2c0ef5 100644
(file)
--- a/
fs/cifs/smb2misc.c
+++ b/
fs/cifs/smb2misc.c
@@
-648,6
+648,13
@@
smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
if (rsp->sync_hdr.Command != SMB2_OPLOCK_BREAK)
return false;
+ if (rsp->sync_hdr.CreditRequest) {
+ spin_lock(&server->req_lock);
+ server->credits += le16_to_cpu(rsp->sync_hdr.CreditRequest);
+ spin_unlock(&server->req_lock);
+ wake_up(&server->request_q);
+ }
+
if (rsp->StructureSize !=
smb2_rsp_struct_sizes[SMB2_OPLOCK_BREAK_HE]) {
if (le16_to_cpu(rsp->StructureSize) == 44)