Skip to content

Commit

Permalink
fix up for "io_uring: support multishot in recvmsg"
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  • Loading branch information
Stephen Rothwell committed Jul 15, 2022
1 parent da04d36 commit 2b0b67d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io_uring/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ static bool io_recvmsg_multishot_overflow(struct io_async_msghdr *iomsg)
{
unsigned long hdr;

if (check_add_overflow(sizeof(struct io_uring_recvmsg_out),
if (check_add_overflow((unsigned long)sizeof(struct io_uring_recvmsg_out),
(unsigned long)iomsg->namelen, &hdr))
return true;
if (check_add_overflow(hdr, iomsg->controllen, &hdr))
if (check_add_overflow(hdr, (unsigned long)iomsg->controllen, &hdr))
return true;
if (hdr > INT_MAX)
return true;
Expand Down

0 comments on commit 2b0b67d

Please sign in to comment.