Skip to content

Fix NULL pointer dereference with virtio-blk-pci and virtual IOMMU

Eric Auger linux-iommu lkml virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 29 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dma-mapping: Protect dma_addressing_limited against NULL dma_maskinclude/linux/dma-mapping.h+3 -20 replies
1/2dma-mapping: Protect dma_addressing_limited against NULL dma_maskinclude/linux/dma-mapping.h+3 -24 replies
2/2virtio/virtio_ring: Fix the dma_max_mapping_size calldrivers/virtio/virtio_ring.c+1 -10 replies
2/2virtio/virtio_ring: Fix the dma_max_mapping_size calldrivers/virtio/virtio_ring.c+1 -125 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchMichael S. Tsirkin
1/2
1/2
2/2A-b A-b
2/2A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Fix NULL pointer dereference with virtio-blk-pci and virtual IOMMU

When running a guest featuring a virtio-blk-pci protected with a virtual IOMMU we hit a NULL pointer dereference.

This series removes the dma_max_mapping_size() call in virtio_max_dma_size when the device does not have any dma_mask set. A check is also added to early return in dma_addressing_limited() if the dma_mask is NULL.

Eric Auger (2):
dma-mapping: Protect dma_addressing_limited against NULL dma_mask virtio/virtio_ring: Fix the dma_max_mapping_size call

 drivers/virtio/virtio_ring.c | 2 +-
 include/linux/dma-mapping.h  | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.20.1