diff options
| author | Jens Axboe <axboe@kernel.dk> | 2026-11-03 08:46:59 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-11-03 09:20:26 -0700 |
| commit | edeac4546a71b6c1db4ba006a2dbf7c863f54e9a (patch) | |
| tree | 1fa7b1c57a8e420a29b118e019b5c06ef5429580 /Documentation/features/debug/stackprotector | |
| parent | 74c1f1048e4401d6a953ab2299b14ace1ad6a899 (diff) | |
io_uring/poll: don't poll a writer for urgent data
io_arm_poll_handler() starts the mask of every async poll with EPOLLPRI,
for a reader and a writer alike. A TCP socket reports EPOLLPRI for as
long as urgent data sits unread, so once the peer has sent a byte with
MSG_OOB, the async poll of a send that waits for buffer space is ready
on every re-arm. The request spins through task_work and
__io_arm_poll_handler() until APOLL_MAX_RETRY is used up and io-wq takes
it, the same spin that EPOLLRDHUP caused for a half-closed peer.
While it spins, the request is neither in the poll hash nor in io-wq. A
cancel issued right after the send gets -ENOENT and the send stays
pending, until a later cancel finds it in io-wq.
Only add EPOLLPRI for polls that want to read. Urgent data is an event
for a recv, not for a writer.
Fixes: d7718a9d25a6 ("io_uring: use poll driven retry for files that support it")
Reported-by: Lukáš Lalinský <lukas@lalinsky.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'Documentation/features/debug/stackprotector')
0 files changed, 0 insertions, 0 deletions
