Commit 9dfc978
io_uring: don't set COMP_LOCKED if won't put
ANBZ: torvalds#501
commit 368c548 upstream.
__io_kill_linked_timeout() sets REQ_F_COMP_LOCKED for a linked timeout
even if it can't cancel it, e.g. it's already running. It not only races
with io_link_timeout_fn() for ->flags field, but also leaves the flag
set and so io_link_timeout_fn() may find it and decide that it holds the
lock. Hopefully, the second problem is potential.
Signed-off-by: Pavel Begunkov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Joseph Qi <[email protected]>
Reviewed-by: Xiaoguang Wang <[email protected]>1 parent bb0f3ad commit 9dfc978
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1598 | 1598 | | |
1599 | 1599 | | |
1600 | 1600 | | |
| 1601 | + | |
1601 | 1602 | | |
1602 | 1603 | | |
1603 | 1604 | | |
| |||
1620 | 1621 | | |
1621 | 1622 | | |
1622 | 1623 | | |
1623 | | - | |
1624 | 1624 | | |
1625 | 1625 | | |
1626 | 1626 | | |
| |||
0 commit comments