Skip to content
Snippets Groups Projects
Commit dd8b0582 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

block: fix NULL pointer dereferenced within __blk_rq_map_sg


The block layer internal flush request may not have bio attached, so the
request iterator has to be initialized from valid req->bio, otherwise NULL
pointer dereferenced is triggered.

Cc: Christoph Hellwig <hch@lst.de>
Reported-and-tested-by: default avatarCheyenne Wills <cheyenne.wills@gmail.com>
Fixes: b7175e24 ("block: add a dma mapping iterator")
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250217031626.461977-1-ming.lei@redhat.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 43c70b10
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment