From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 2/5] iommu/exynos: Fix warnings from DMA-debug Date: Tue, 29 Nov 2016 17:43:10 +0100 Message-ID: <20161129164310.GC13850@8bytes.org> References: <1479986420-30859-1-git-send-email-m.szyprowski@samsung.com> <1479986420-30859-3-git-send-email-m.szyprowski@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1479986420-30859-3-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Marek Szyprowski Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz List-Id: iommu@lists.linux-foundation.org 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