Re: [PATCH] io_uring: rw: Fix an unsigned comparison which can never be negative

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

 



On 9/14/22 11:49 PM, Jiapeng Chong wrote:
> The parameter 'res' is defined as unsigned type, so the following if
> statement is invalid, we can modify the type of res to long.
> if (res < 0)
>   	res = io->bytes_done;
> else
>   	res += io->bytes_done;
> 
> io_uring/rw.c:265 io_fixup_rw_res() warn: unsigned 'res' is never less than zero.

This one is already fixed here:

https://git.kernel.dk/cgit/linux-block/commit/?h=io_uring-6.0&id=62bb0647b14646fa6c9aa25ecdf67ad18f13523c

-- 
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