diff options
author | David Miller <davem@davemloft.net> | 2006-10-25 23:51:07 -0700 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-11-03 17:33:46 -0800 |
commit | 955ebc8df7709dbcb92d7bf74a2598282e1c9307 (patch) | |
tree | 81bcc9f61f7653c5285de15673d1abf94b85b4ab | |
parent | 59bf9f2fd5c23b6776520d75c67825a33f4fbbbc (diff) |
[PATCH] 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | arch/sparc64/kernel/pci_iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c index 82e5455134c..2e7f1427088 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, spin_lock_irqsave(&iommu->lock, flags); - free_npages(iommu, dvma, npages); + free_npages(iommu, dvma - iommu->page_table_map_base, npages); spin_unlock_irqrestore(&iommu->lock, flags); |