• J
    blk-mq: fix potential oops with polling and blk-mq scheduler · 3a07bb1d
    Jens Axboe 提交于
    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: bd166ef1 ("blk-mq-sched: add framework for MQ capable IO schedulers")
    Tested-by: NStephen Bates <sbates@raithlin.com>
    Signed-off-by: NJens Axboe <axboe@fb.com>
    3a07bb1d
blk-mq.c 71.0 KB