mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
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: 4bf94615b8 ("io_uring: allow IORING_OP_ASYNC_CANCEL with 'fd' key")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
2e02f9efdb
commit
22dbb0987b
1 changed files with 2 additions and 4 deletions
|
|
@ -6,10 +6,8 @@
|
|||
|
||||
struct io_cancel_data {
|
||||
struct io_ring_ctx *ctx;
|
||||
union {
|
||||
u64 data;
|
||||
struct file *file;
|
||||
};
|
||||
u8 opcode;
|
||||
u32 flags;
|
||||
int seq;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue