Skip to content

Commit

Permalink
smb: client: get rid of bounds check in SMB2_ioctl_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pcacjr authored and Steve French committed Nov 21, 2024
1 parent bc925c1 commit 9f544d2
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions fs/smb/client/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3313,15 +3313,6 @@ SMB2_ioctl_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
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
Expand Down

0 comments on commit 9f544d2

Please sign in to comment.