]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: fail NOP if non-zero op flags is passed in
authorMing Lei <ming.lei@redhat.com>
Fri, 10 May 2024 03:50:27 +0000 (11:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:53 +0000 (13:39 +0200)
commit88678723cb0baefe49ae69b11a61da2c6a3af60e
tree5730591668787c9fe4a3b1aa6ab1b4036e927d02
parente345538cbc2f5141022aaaedee22a8e1486e35a0
io_uring: fail NOP if non-zero op flags is passed in

commit 3d8f874bd620ce03f75a5512847586828ab86544 upstream.

The NOP op flags should have been checked from beginning like any other
opcode, otherwise NOP may not be extended with the op flags.

Given both liburing and Rust io-uring crate always zeros SQE op flags, just
ignore users which play raw NOP uring interface without zeroing SQE, because
NOP is just for test purpose. Then we can save one NOP2 opcode.

Suggested-by: Jens Axboe <axboe@kernel.dk>
Fixes: 2b188cc1bb85 ("Add io_uring IO interface")
Cc: stable@vger.kernel.org
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20240510035031.78874-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.c