smb2_set_next_command() no longer squashes request iovs into a single
iov, so the bounds check can be dropped.
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
return rc;
if (indatalen) {
- unsigned int len;
-
- if (WARN_ON_ONCE(smb3_encryption_required(tcon) &&
- (check_add_overflow(total_len - 1,
- ALIGN(indatalen, 8), &len) ||
- len > MAX_CIFS_SMALL_BUFFER_SIZE))) {
- cifs_small_buf_release(req);
- return -EIO;
- }
/*
* indatalen is usually small at a couple of bytes max, so
* just allocate through generic pool