diff options
author | David S. Miller <davem@davemloft.net> | 2007-03-09 10:41:04 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-03-09 10:41:04 +0100 |
commit | ec333318b748e4f4ac3679a197620503b6d19d20 (patch) | |
tree | 4dc983bf23645171c93af60e8c41dc459103fcd0 /arch | |
parent | 0096623513107562ede3254df8d50d86474e5a7a (diff) | |
download | linux-stable-ec333318b748e4f4ac3679a197620503b6d19d20.tar.gz linux-stable-ec333318b748e4f4ac3679a197620503b6d19d20.tar.bz2 linux-stable-ec333318b748e4f4ac3679a197620503b6d19d20.zip |
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: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'arch')
-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 f63f0653dd0e..df9a3648dbc9 100644 --- a/arch/sparc64/kernel/pci_iommu.c +++ b/arch/sparc64/kernel/pci_iommu.c @@ -282,7 +282,7 @@ void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_ 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); |