summaryrefslogtreecommitdiff
path: root/include/linux/pgalloc.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2026-03-15 09:03:03 -0600
committerJens Axboe <axboe@kernel.dk>2026-03-17 13:54:08 -0600
commita68ed2df72131447d131531a08fe4dfcf4fa4653 (patch)
treec3e72484af4e181faf2823aa773dd26f51f03d00 /include/linux/pgalloc.h
parentc2c185be5c85d37215397c8e8781abf0a69bec1f (diff)
io_uring/poll: fix multishot recv missing EOF on wakeup race
When a socket send and shutdown() happen back-to-back, both fire wake-ups before the receiver's task_work has a chance to run. The first wake gets poll ownership (poll_refs=1), and the second bumps it to 2. When io_poll_check_events() runs, it calls io_poll_issue() which does a recv that reads the data and returns IOU_RETRY. The loop then drains all accumulated refs (atomic_sub_return(2) -> 0) and exits, even though only the first event was consumed. Since the shutdown is a persistent state change, no further wakeups will happen, and the multishot recv can hang forever. Check specifically for HUP in the poll loop, and ensure that another loop is done to check for status if more than a single poll activation is pending. This ensures we don't lose the shutdown event. Cc: stable@vger.kernel.org Fixes: dbc2564cfe0f ("io_uring: let fast poll support multishot") Reported-by: Francis Brosseau <francis@malagauche.com> Link: https://github.com/axboe/liburing/issues/1549 Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/pgalloc.h')
0 files changed, 0 insertions, 0 deletions