diff options
| author | Jens Axboe <axboe@kernel.dk> | 2026-02-17 00:16:27 +0300 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-03-04 15:20:34 +0300 |
| commit | 65521ecb8640285c281c1d939219ae604ecbe5fb (patch) | |
| tree | fd1520f0e8787ebd9f1f55477c39399c1fff255b /io_uring | |
| parent | 0d1f212202613d1367813d31363615e03fab9194 (diff) | |
| download | linux-65521ecb8640285c281c1d939219ae604ecbe5fb.tar.xz | |
io_uring/cancel: de-unionize file and user_data in struct io_cancel_data
[ Upstream commit 22dbb0987bd1e0ec3b1e4ad20756a98f99aa4a08 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'io_uring')
| -rw-r--r-- | io_uring/cancel.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/io_uring/cancel.h b/io_uring/cancel.h index b33995e00ba9..da13a1d82062 100644 --- a/io_uring/cancel.h +++ b/io_uring/cancel.h @@ -6,10 +6,8 @@ struct io_cancel_data { struct io_ring_ctx *ctx; - union { - u64 data; - struct file *file; - }; + u64 data; + struct file *file; u8 opcode; u32 flags; int seq; |
