linux/x86: dma_map_dg(): BUG_ON() before use
PATCH 1/1 linux/x86: dma_map_dg(): BUG_ON() before use
As usual, written and tested against 2.6.24-rc3 and made apply against 2.6.18 without further testing.
Signed-off-by Jan Beulich <[email protected]>
arch/i386/kernel/pci-dma-xen.c +1 -1
@@ -92,10 +92,10 @@ dma_map_sg(struct device *hwdev, struct rc =swiotlb_map_sg (hwdev, sg, nents, direction); }else {for (i =0 ; i < nents; i++ ) { +BUG_ON (!sg[i].page); sg[i].dma_address =gnttab_dma_map_page (sg[i].page) + sg[i].offset; sg[i].dma_length = sg[i].length; -BUG_ON (!sg[i].page);IOMMU_BUG_ON (address_needs_mapping ( hwdev, sg[i].dma_address)); IOMMU_BUG_ON(range_straddles_page_boundary(