Commit 3a07bb1
committed
blk-mq: fix potential oops with polling and blk-mq scheduler
If we have a scheduler attached, blk_mq_tag_to_rq() on the
scheduled tags will return NULL if a request is no longer
in flight. This is different than using the normal tags,
where it will always return the fixed request. Check for
this condition for polling, in case we happen to enter
polling for a completed request.
The request address remains valid, so this check and return
should be perfectly safe.
Fixes: bd166ef ("blk-mq-sched: add framework for MQ capable IO schedulers")
Tested-by: Stephen Bates <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>1 parent be56945 commit 3a07bb1
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2928 | 2928 | | |
2929 | 2929 | | |
2930 | 2930 | | |
2931 | | - | |
| 2931 | + | |
2932 | 2932 | | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
2933 | 2942 | | |
2934 | 2943 | | |
2935 | 2944 | | |
| |||
0 commit comments