linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix NULL pointer dereference with virtio-blk-pci and virtual IOMMU
@ 2019-07-22 14:55 Eric Auger
  2019-07-22 14:55 ` [PATCH 1/2] dma-mapping: Protect dma_addressing_limited against NULL dma_mask Eric Auger
  2019-07-22 14:55 ` [PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call Eric Auger
  0 siblings, 2 replies; 18+ messages in thread
From: Eric Auger @ 2019-07-22 14:55 UTC (permalink / raw)
  To: eric.auger.pro, eric.auger, hch, m.szyprowski, robin.murphy, mst,
	jasowang, virtualization, iommu, linux-kernel

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(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-07-25 16:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 14:55 [PATCH 0/2] Fix NULL pointer dereference with virtio-blk-pci and virtual IOMMU Eric Auger
2019-07-22 14:55 ` [PATCH 1/2] dma-mapping: Protect dma_addressing_limited against NULL dma_mask Eric Auger
2019-07-22 15:26   ` Christoph Hellwig
2019-07-22 15:46     ` Auger Eric
2019-07-22 14:55 ` [PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call Eric Auger
2019-07-22 15:27   ` Christoph Hellwig
2019-07-22 15:39     ` Michael S. Tsirkin
2019-07-22 15:33   ` Michael S. Tsirkin
2019-07-23 15:38     ` Christoph Hellwig
2019-07-23 15:47       ` Michael S. Tsirkin
2019-07-22 15:36   ` Robin Murphy
2019-07-22 15:45     ` Michael S. Tsirkin
2019-07-23 15:38     ` Christoph Hellwig
2019-07-24 22:10       ` Michael S. Tsirkin
2019-07-25  5:25         ` Christoph Hellwig
2019-07-25 11:53       ` Auger Eric
2019-07-25 13:04         ` Christoph Hellwig
2019-07-25 16:32           ` Auger Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).