On Thu, Nov 24, 2016 at 12:20:17PM +0100, Marek Szyprowski wrote:
> @@ -744,6 +744,7 @@ static struct iommu_domain 
> *exynos_iommu_domain_alloc(unsigned type)
>                               DMA_TO_DEVICE);
>       /* For mapping page table entries we rely on dma == phys */
>       BUG_ON(handle != virt_to_phys(domain->pgtable));
> +     BUG_ON(dma_mapping_error(dma_dev, handle));

A BUG_ON is a bad way of handling this. Please propagate the error
upwards, there is no need to crash the kernel because of a failure like
this.


        Joerg

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to