Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

blk-mq-dma: always initialize dma state

Ensure the dma state is initialized when we're not using the contiguous
iova, otherwise the caller may be using a stale state from a previous
request that could use the coalesed iova allocation.

Fixes: 2f6b2565d43cdb5 ("block: accumulate memory segment gaps per bio")
Reported-by: Sebastian Ott <sebott@redhat.com>
Tested-by: Sebastian Ott <sebott@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Keith Busch and committed by
Jens Axboe
a0750fae f22ecf9c

+1
+1
block/blk-mq-dma.c
··· 199 199 if (blk_can_dma_map_iova(req, dma_dev) && 200 200 dma_iova_try_alloc(dma_dev, state, vec.paddr, total_len)) 201 201 return blk_rq_dma_map_iova(req, dma_dev, state, iter, &vec); 202 + memset(state, 0, sizeof(*state)); 202 203 return blk_dma_map_direct(req, dma_dev, iter, &vec); 203 204 } 204 205