Commit 09ca6c4
committed
io-wq: kill hashed waitqueue before manager exits
If we race with shutting down the io-wq context and someone queueing
a hashed entry, then we can exit the manager with it armed. If it then
triggers after the manager has exited, we can have a use-after-free where
io_wqe_hash_wake() attempts to wake a now gone manager process.
Move the killing of the hashed write queue into the manager itself, so
that we know we've killed it before the task exits.
Fixes: e941894 ("io-wq: make buffered file write hashed work map per-ctx")
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent b5b0ecb commit 09ca6c4
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
729 | 734 | | |
730 | 735 | | |
731 | 736 | | |
| |||
1051 | 1056 | | |
1052 | 1057 | | |
1053 | 1058 | | |
1054 | | - | |
1055 | 1059 | | |
1056 | 1060 | | |
1057 | | - | |
1058 | | - | |
1059 | 1061 | | |
1060 | 1062 | | |
1061 | 1063 | | |
1062 | | - | |
1063 | 1064 | | |
1064 | 1065 | | |
1065 | 1066 | | |
| |||
0 commit comments