Skip to content

Commit 7faaa68

Browse files
committed
io_uring/futex: ensure partial wakes are appropriately dequeued
If a FUTEX_WAITV vectored operation is only partially woken, we should call __futex_wake_mark() on the queue to account for that. If not, then a later wakeup will wake the same entry, rather than the next one in line. Fixes: 8f35019 ("io_uring: add support for vectored futex waits") Reviewed-by: Gabriel Krisman Bertazi <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 7996883 commit 7faaa68

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

io_uring/futex.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ static void io_futex_wakev_fn(struct wake_q_head *wake_q, struct futex_q *q)
159159
struct io_kiocb *req = q->wake_data;
160160
struct io_futexv_data *ifd = req->async_data;
161161

162-
if (!io_futexv_claim(ifd))
162+
if (!io_futexv_claim(ifd)) {
163+
__futex_wake_mark(q);
163164
return;
165+
}
164166
if (unlikely(!__futex_wake_mark(q)))
165167
return;
166168

0 commit comments

Comments
 (0)