Re: [PATCH] io_uring: avoid implicit conversion to ktime_t

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

 



On 2/14/25 12:39 AM, Dmitry Antipov wrote:
> In 'io_get_ext_arg()', do not assume that 'min_wait_usec' of 'struct
> io_uring_getevents_arg' (which is '__u32') multiplied by NSEC_PER_USEC
> may be implicitly converted to 'ktime_t' but use the convenient
> 'us_to_ktime()' helper instead. Compile tested only.
> 
> Suggested-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
> Signed-off-by: Dmitry Antipov <dmantipov@xxxxxxxxx>
> ---
> I didn't add Fixes: as per Jeff's remark at
> https://lore.kernel.org/io-uring/x49ed01lkso.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx/T/#t;
> if you think that it should be, most likely they are:
> 
> aa00f67adc2c ("io_uring: add support for fixed wait regions")
> 7ed9e09e2d13 ("io_uring: wire up min batch wake timeout")

I don't think that's needed, as it's not really fixing anything.
Using us_to_ktime() is identical to the code that's already there.

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