Commit 23fffb2
committed
io_uring/cancel: re-grab ctx mutex after finishing wait
If we have a signal pending during cancelations, it'll cause the
task_work run to return an error. Since we didn't run task_work, the
current task is left in TASK_INTERRUPTIBLE state when we need to
re-grab the ctx mutex, and the kernel will rightfully complain about
that.
Move the lock grabbing for the error cases outside the loop to avoid
that issue.
Reported-by: [email protected]
Link: https://lore.kernel.org/io-uring/[email protected]/
Signed-off-by: Jens Axboe <[email protected]>1 parent 52ea806 commit 23fffb2
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
294 | | - | |
295 | 295 | | |
296 | | - | |
297 | | - | |
| 296 | + | |
298 | 297 | | |
299 | | - | |
300 | 298 | | |
301 | | - | |
302 | 299 | | |
303 | 300 | | |
304 | 301 | | |
305 | 302 | | |
| 303 | + | |
306 | 304 | | |
307 | 305 | | |
308 | 306 | | |
| 307 | + | |
309 | 308 | | |
310 | 309 | | |
311 | 310 | | |
| |||
0 commit comments