--- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -238,7 +238,7 @@ struct fixed_rsrc_data { struct io_buffer { struct list_head list; __u64 addr; - __s32 len; + __u32 len; __u16 bid; }; @@ -4017,7 +4017,7 @@ static int io_add_buffers(struct io_prov break; buf->addr = addr; - buf->len = pbuf->len; + buf->len = min_t(__u32, pbuf->len, MAX_RW_COUNT); buf->bid = bid; addr += pbuf->len; bid++;