linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch v2 1/6] cifs: smbd: Check for iov length on sending the last iov
@ 2018-04-17 19:17 Long Li
  2018-04-17 19:17 ` [Patch v2 2/6] cifs: Allocate validate negotiation request through kmalloc Long Li
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Long Li @ 2018-04-17 19:17 UTC (permalink / raw)
  To: Steve French, linux-cifs, samba-technical, linux-kernel, linux-rdma
  Cc: Long Li, stable

From: Long Li <longli@microsoft.com>

When sending the last iov that breaks into smaller buffers to fit the
transfer size, it's necessary to check if this is the last iov.

If this is the latest iov, stop and proceed to send pages.

Signed-off-by: Long Li <longli@microsoft.com>
Cc: stable@vger.kernel.org
---
 fs/cifs/smbdirect.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c
index 90e673c..b5c6c0d 100644
--- a/fs/cifs/smbdirect.c
+++ b/fs/cifs/smbdirect.c
@@ -2197,6 +2197,8 @@ int smbd_send(struct smbd_connection *info, struct smb_rqst *rqst)
 						goto done;
 				}
 				i++;
+				if (i == rqst->rq_nvec)
+					break;
 			}
 			start = i;
 			buflen = 0;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-04-23 19:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17 19:17 [Patch v2 1/6] cifs: smbd: Check for iov length on sending the last iov Long Li
2018-04-17 19:17 ` [Patch v2 2/6] cifs: Allocate validate negotiation request through kmalloc Long Li
2018-04-17 19:59   ` Parav Pandit
2018-04-17 20:11     ` Long Li
2018-04-17 20:37       ` Steve French
2018-04-19  0:45   ` Michael Kelley (EOSG)
2018-04-19  0:48     ` Long Li
2018-04-17 19:17 ` [Patch v2 3/6] cifs: smbd: Avoid allocating iov on the stack Long Li
2018-04-23 15:31   ` Steve French
2018-04-23 17:33     ` Long Li
2018-04-23 17:50       ` Steve French
2018-04-17 19:17 ` [Patch v2 4/6] cifs: smbd: Don't use RDMA read/write when signing is used Long Li
2018-04-23 15:34   ` Steve French
2018-04-17 19:17 ` [Patch v2 5/6] cifs: smbd: Enable signing with smbdirect Long Li
2018-04-17 19:17 ` [Patch v2 6/6] cifs: smbd: Dump SMB packet when configured Long Li
2018-04-22 23:27 ` [Patch v2 1/6] cifs: smbd: Check for iov length on sending the last iov Michael Kelley (EOSG)
2018-04-23 19:34   ` Long Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).