engines/io_uring: fix coverity issue
authorAnkit Kumar <ankit.kumar@samsung.com>
Tue, 16 May 2023 12:17:17 +0000 (17:47 +0530)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 May 2023 15:01:57 +0000 (09:01 -0600)
commitbe42eadd18fad2569dfc6517940db8bbe2469f6d
tree72b9675327cb02df134e29b2629db1f03f8fec38
parent83b2d4b78374055c3a2261136eedf03b5fbfc335
engines/io_uring: fix coverity issue

*** CID 455020:  Integer handling issues  (BAD_SHIFT)
/engines/io_uring.c: 1201 in fio_ioring_cmd_open_file()

In expression "1 << data->lba_shift", left shifting by more than 31 bits
has undefined behavior.  The shift amount, "data->lba_shift", is 4294967295

Fixes: 345fa8f ("engines/io_uring_cmd: add extended LBA support")

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Link: https://lore.kernel.org/r/20230516121717.28508-2-ankit.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/io_uring.c