Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab60ee7b authored by Long Li's avatar Long Li Committed by Steve French
Browse files

cifs: smbd: Check for iov length on sending the last iov



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: default avatarLong Li <longli@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
parent a5240cbd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2194,6 +2194,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;