Re: [PATCH] io_uring: check for rollover of buffer ID when providing buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/10/22 10:55 AM, Jens Axboe wrote:
> We already check if the chosen starting offset for the buffer IDs fit
> within an unsigned short, as 65535 is the maximum value for a provided
> buffer. But if the caller asks to add N buffers at offset M, and M + N
> would exceed the size of the unsigned short, we simply add buffers with
> wrapping around the ID.
> 
> This is not necessarily a bug and could in fact be a valid use case, but
> it seems confusing and inconsistent with the initial check for starting
> offset. Let's check for wrap consistently, and error the addition if we
> do need to wrap.
> 
> Reported-by: Oliver Lang <Oliver.Lang@xxxxxxxxxxxxxxxxxxx>

Sorry, that was the wrong email, I have updated the commit locally.

-- 
Jens Axboe





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux