Commit f50e16c
ublk: don't issue uring_cmd from fallback task work
When ublk_ch_uring_cmd_cb() runs as fallback task work (e.g., because
the submitting task is exiting), the command should not be issued as
current is a kworker, not the daemon task. This can cause io->task
to capture the wrong task in __ublk_fetch(), leading to a task
mismatch warning in ublk_uring_cmd_cancel_fn().
Check tw.cancel and return -ECANCELED instead of issuing the command
from fallback context.
Fixes: 3421c7f ("ublk: make sure io cmd handled in submitter task context")
Signed-off-by: Ming Lei <[email protected]>1 parent 5a9f7c7 commit f50e16c
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3496 | 3496 | | |
3497 | 3497 | | |
3498 | 3498 | | |
3499 | | - | |
| 3499 | + | |
3500 | 3500 | | |
| 3501 | + | |
| 3502 | + | |
3501 | 3503 | | |
3502 | 3504 | | |
3503 | 3505 | | |
| |||
0 commit comments