mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 23:50:25 +00:00
[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>
This commit is contained in:
parent
4130a4b206
commit
012d64ff68
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user