Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946514AbWKAFkA (ORCPT ); Wed, 1 Nov 2006 00:40:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1946510AbWKAFjh (ORCPT ); Wed, 1 Nov 2006 00:39:37 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:45457 "EHLO sous-sol.org") by vger.kernel.org with ESMTP id S1946512AbWKAFjI (ORCPT ); Wed, 1 Nov 2006 00:39:08 -0500 Message-Id: <20061101053923.029626000@sous-sol.org> References: <20061101053340.305569000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Tue, 31 Oct 2006 21:34:04 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk, David Miller , Greg Kroah-Hartman Subject: [PATCH 24/61] SPARC64: Fix memory corruption in pci_4u_free_consistent(). Content-Disposition: inline; filename=sparc64-fix-memory-corruption-in-pci_4u_free_consistent.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1140 Lines: 35 -stable review patch. If anyone has any objections, please let us know. ------------------ From: David Miller 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 Signed-off-by: Greg Kroah-Hartman Signed-off-by: Chris Wright --- arch/sparc64/kernel/pci_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.18.1.orig/arch/sparc64/kernel/pci_iommu.c +++ linux-2.6.18.1/arch/sparc64/kernel/pci_iommu.c @@ -281,7 +281,7 @@ static void pci_4u_free_consistent(struc 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); -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/