Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/cancel: de-unionize file and user_data in struct io_cancel_data

By having them share the same space in struct io_cancel_data, it ends up
disallowing IORING_ASYNC_CANCEL_FD|IORING_ASYNC_CANCEL_USERDATA from
working. Eg you cannot match on both a file and user_data for
cancelation purposes. This obviously isn't a common use case as nobody
has reported this, but it does result in -ENOENT potentially being
returned when trying to match on both, rather than actually doing what
the API says it would.

Fixes: 4bf94615b888 ("io_uring: allow IORING_OP_ASYNC_CANCEL with 'fd' key")
Signed-off-by: Jens Axboe <axboe@kernel.dk>

+2 -4
+2 -4
io_uring/cancel.h
··· 6 6 7 7 struct io_cancel_data { 8 8 struct io_ring_ctx *ctx; 9 - union { 10 - u64 data; 11 - struct file *file; 12 - }; 9 + u64 data; 10 + struct file *file; 13 11 u8 opcode; 14 12 u32 flags; 15 13 int seq;