arm: mm: add check for coherency in arm_iommu_free_attrs
Some users pass DMA_ATTR_FORCE_COHERENT for per buffer coherency in which case kernel uses the normal instead of coherent iommu ops. As with the current implementation, while allocation returns normal memory and freeing happens treating it as a coherent memory causing the below stack. Fix it. [<c0208d98>] __dma_free_buffer+0x34/0x44 [<c0118804>] __arm_iommu_free_attrs+0x68/0x12c [<c0116394>] arm_iommu_free_attrs+0x64/0x6c [<c01166a0>] dwc3_msm_gsi_ep_op+0x10e8/0x1d9c [<c06d2860>] usb_gsi_ep_op+0x38/0x44 This fixes aebd6fce("dma-mapping: add i/o coherency support for 32bit"). Change-Id: Ic92973171f08790ecfc5345bbf7f9bc2d6606bfe Signed-off-by:Charan Teja Reddy <charante@codeaurora.org>
Loading
Please register or sign in to comment