]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: smbd: Check for iov length on sending the last iov
authorLong Li <longli@microsoft.com>
Tue, 17 Apr 2018 19:17:05 +0000 (12:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 09:00:35 +0000 (11:00 +0200)
commit8d931c6adf5def75d1bc36ec1e17458b1d3045e9
tree6a888b0d67fa6441045cf16d1f25dba0cd97ae56
parentb42b71cd28f213cf4688b9891e66b57bdb6eefe8
cifs: smbd: Check for iov length on sending the last iov

commit ab60ee7bf9a84954f50a66a3d835860e80f99b7f upstream.

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
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smbdirect.c