diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-03-22 13:57:25 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-03-23 13:26:05 +0100 |
commit | e2c0cb7c0cc72939b61a7efee376206725796625 (patch) | |
tree | 4001bb31bedb491d5cc5c49df3d5b6213773aac9 /fs | |
parent | io_uring: remove poll entry from list when canceling all (diff) | |
download | linux-e2c0cb7c0cc72939b61a7efee376206725796625.tar.xz linux-e2c0cb7c0cc72939b61a7efee376206725796625.zip |
io_uring: bump poll refs to full 31-bits
The previous commit:
1bc84c40088 ("io_uring: remove poll entry from list when canceling all")
removed a potential overflow condition for the poll references. They
are currently limited to 20-bits, even if we have 31-bits available. The
upper bit is used to mark for cancelation.
Bump the poll ref space to 31-bits, making that kind of situation much
harder to trigger in general. We'll separately add overflow checking
and handling.
Fixes: aa43477b0402 ("io_uring: poll rework")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 53bd71363a44..e8d88f0cdad3 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5793,7 +5793,7 @@ struct io_poll_table { }; #define IO_POLL_CANCEL_FLAG BIT(31) -#define IO_POLL_REF_MASK ((1u << 20)-1) +#define IO_POLL_REF_MASK GENMASK(30, 0) /* * If refs part of ->poll_refs (see IO_POLL_REF_MASK) is 0, it's free. We can |