Skip to content

Commit

Permalink
ARM: dma-mapping: NULLify dev->archdata.mapping pointer on detach
Browse files Browse the repository at this point in the history
The current code only clobbers a local variable, so the device is left
with a stale mapping pointer.

Cc: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
  • Loading branch information
Will Deacon authored and Marek Szyprowski committed Jun 28, 2013
1 parent 13987d6 commit 9e4b259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ void arm_iommu_detach_device(struct device *dev)

iommu_detach_device(mapping->domain, dev);
kref_put(&mapping->kref, release_iommu_mapping);
mapping = NULL;
dev->archdata.mapping = NULL;
set_dma_ops(dev, NULL);

pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev));
Expand Down

0 comments on commit 9e4b259

Please sign in to comment.