Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 8f350194d5cfd ("io_uring: add support for vectored futex waits")
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

+3 -1
+3 -1
io_uring/futex.c
··· 159 159 struct io_kiocb *req = q->wake_data; 160 160 struct io_futexv_data *ifd = req->async_data; 161 161 162 - if (!io_futexv_claim(ifd)) 162 + if (!io_futexv_claim(ifd)) { 163 + __futex_wake_mark(q); 163 164 return; 165 + } 164 166 if (unlikely(!__futex_wake_mark(q))) 165 167 return; 166 168