aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2021-08-18 01:09:25 +0000
committerJens Axboe <[email protected]>2021-08-18 02:17:34 +0000
commita9ed27a764156929efe714033edb3e9023c5f321 (patch)
treeb15ecb242fe0aef9bdf8c7d2d999a49ba0a94f81 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
parentblk-mq: fix kernel panic during iterating over flush request (diff)
downloadkernel-a9ed27a764156929efe714033edb3e9023c5f321.tar.gz
kernel-a9ed27a764156929efe714033edb3e9023c5f321.zip
blk-mq: fix is_flush_rq
is_flush_rq() is called from bt_iter()/bt_tags_iter(), and runs the following check: hctx->fq->flush_rq == req but the passed hctx from bt_iter()/bt_tags_iter() may be NULL because: 1) memory re-order in blk_mq_rq_ctx_init(): rq->mq_hctx = data->hctx; ... refcount_set(&rq->ref, 1); OR 2) tag re-use and ->rqs[] isn't updated with new request. Fix the issue by re-writing is_flush_rq() as: return rq->end_io == flush_end_io; which turns out simpler to follow and immune to data race since we have ordered WRITE rq->end_io and refcount_set(&rq->ref, 1). Fixes: 2e315dc07df0 ("blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter") Cc: "Blank-Burian, Markus, Dr." <[email protected]> Cc: Yufen Yu <[email protected]> Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions