aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-10-26 01:33:07 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-26 01:39:16 -0400
commit012d64ff68f304df1c35ce5902f5023dc14b643f (patch)
treeda1e6691c0c9a4d087b441762ce9df8974178339 /arch/sparc64
parent4130a4b206e7c628482aa12ec30949382c8cdc5e (diff)
[SPARC64]: Fix memory corruption in pci_4u_free_consistent().
The second argument to free_npages() was being incorrectly calculated, which would thus access far past the end of the arena->map[] bitmap. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/pci_iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c
index 82e5455134c6..2e7f1427088a 100644
--- a/arch/sparc64/kernel/pci_iommu.c
+++ b/arch/sparc64/kernel/pci_iommu.c
@@ -281,7 +281,7 @@ static void pci_4u_free_consistent(struct pci_dev *pdev, size_t size, void *cpu,
281 281
282 spin_lock_irqsave(&iommu->lock, flags); 282 spin_lock_irqsave(&iommu->lock, flags);
283 283
284 free_npages(iommu, dvma, npages); 284 free_npages(iommu, dvma - iommu->page_table_map_base, npages);
285 285
286 spin_unlock_irqrestore(&iommu->lock, flags); 286 spin_unlock_irqrestore(&iommu->lock, flags);
287 287