Commit 61c1b44
io_uring: fix deadlock on iowq file slot alloc
io_fixed_fd_install() can grab uring_lock in the slot allocation path
when called from io-wq, and then call into io_install_fixed_file(),
which will lock it again. Pull all locking out of
io_install_fixed_file() into io_fixed_fd_install().
Fixes: 1339f24 ("io_uring: allow allocated fixed files for openat/openat2")
Signed-off-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/64116172a9d0b85b85300346bb280f3657aafc26.1654087283.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>1 parent a7c41b4 commit 61c1b44
1 file changed
+15
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5448 | 5448 | | |
5449 | 5449 | | |
5450 | 5450 | | |
| 5451 | + | |
| 5452 | + | |
5451 | 5453 | | |
5452 | | - | |
5453 | 5454 | | |
5454 | | - | |
5455 | | - | |
5456 | | - | |
5457 | | - | |
5458 | | - | |
5459 | | - | |
| 5455 | + | |
| 5456 | + | |
5460 | 5457 | | |
5461 | 5458 | | |
5462 | 5459 | | |
5463 | 5460 | | |
5464 | 5461 | | |
5465 | 5462 | | |
5466 | | - | |
5467 | | - | |
5468 | | - | |
5469 | | - | |
5470 | | - | |
5471 | | - | |
| 5463 | + | |
| 5464 | + | |
| 5465 | + | |
| 5466 | + | |
| 5467 | + | |
| 5468 | + | |
5472 | 5469 | | |
5473 | 5470 | | |
5474 | 5471 | | |
| |||
10179 | 10176 | | |
10180 | 10177 | | |
10181 | 10178 | | |
| 10179 | + | |
10182 | 10180 | | |
10183 | 10181 | | |
10184 | 10182 | | |
10185 | 10183 | | |
10186 | | - | |
| 10184 | + | |
10187 | 10185 | | |
10188 | | - | |
10189 | 10186 | | |
10190 | | - | |
10191 | | - | |
| 10187 | + | |
10192 | 10188 | | |
10193 | | - | |
10194 | | - | |
| 10189 | + | |
10195 | 10190 | | |
10196 | | - | |
| 10191 | + | |
10197 | 10192 | | |
10198 | 10193 | | |
10199 | 10194 | | |
| |||
10224 | 10219 | | |
10225 | 10220 | | |
10226 | 10221 | | |
10227 | | - | |
10228 | 10222 | | |
10229 | 10223 | | |
10230 | 10224 | | |
| |||
0 commit comments