]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: smbd: Check send queue size before posting a send
authorLong Li <longli@microsoft.com>
Mon, 30 Mar 2020 18:04:07 +0000 (11:04 -0700)
committerSteve French <stfrench@microsoft.com>
Tue, 7 Apr 2020 17:41:16 +0000 (12:41 -0500)
commite2b917f0f03a6036a033e83181c0c1a6048098d8
treeb6450147a9a1092f6b445dcbde85dba5cba07b9d
parentab69718c21c61b9cf2614c41484a8273eff6a2a0
cifs: smbd: Check send queue size before posting a send

Sometimes the remote peer may return more send credits than the send queue
depth. If all the send credits are used to post senasd, we may overflow the
send queue.

Fix this by checking the send queue size before posting a send.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smbdirect.c
fs/cifs/smbdirect.h