[PATCH 1/1] ppc64: iommu vmerge fix

Olof Johansson olof at lixom.net
Thu Aug 18 07:05:37 EST 2005


On Wed, Aug 17, 2005 at 03:44:02PM -0500, brking at us.ibm.com wrote:

> The patch below fixes a bug in the PPC64 iommu vmerge code
> which results in the potential for iommu_unmap_sg to go off
> unmapping more than it should. This was found on a test system
> which resulted in PCI bus errors due to PCI memory being
> unmapped while DMAs were still in progress.

Good catch!

What baffles me a bit is why we haven't seen this until now. If we
really do merge entries then we would have been freeing entries that we
shouldn't have freed quite often, and we should have popped the test in
__iommu_free() at least some of the time.

We also don't do any checking to make sure we're not clearing bits in
the it_map that are already cleared. Could be worth adding. Could be
done later though.

Paul, this would be good to get into 2.6.13.

> Signed-off-by: Brian King <brking at us.ibm.com>
Acked-by: Olof Johansson <olof at lixom.net>



More information about the Linuxppc64-dev mailing list