From: Chris Wright Date: Tue, 24 Jan 2006 19:37:47 +0000 (-0800) Subject: Fix a gfp.h BUG by masking off GFP flags before swiotlb_alloc_coherent. X-Git-Tag: v2.6.14.7~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad05afdb10310cc08b4829f28e2e31af0331a069;p=thirdparty%2Fkernel%2Fstable-queue.git Fix a gfp.h BUG by masking off GFP flags before swiotlb_alloc_coherent. Fix from Andi, fwd from Andrew. --- diff --git a/queue/mask-off-GFP-flags-before-swiotlb_alloc_coherent.patch b/queue/mask-off-GFP-flags-before-swiotlb_alloc_coherent.patch new file mode 100644 index 00000000000..e69b0533b5c --- /dev/null +++ b/queue/mask-off-GFP-flags-before-swiotlb_alloc_coherent.patch @@ -0,0 +1,38 @@ +From stable-bounces@linux.kernel.org Sat Jan 21 13:18:41 2006 +Date: Sat, 21 Jan 2006 13:13:13 -0800 +From: Andrew Morton +To: stable@kernel.org +Message-Id: <20060121131313.551c624f.akpm@osdl.org> +Cc: Andi Kleen +Subject: [PATCH] Mask off GFP flags before swiotlb_alloc_coherent + +From: Andi Kleen + +Mask off GFP flags before swiotlb_alloc_coherent + +Signed-off-by: Andi Kleen +Signed-off-by: Chris Wright +--- + +akpm: Guys, this is a simple patch from Andi to fix a gfp.h BUG due to us +passing bad gfp flags into gfp_zone. + +This is not a 2.6.16-x backport - because the pci-gart code in mainline gt +radically redone. + +This is, I think, a new problem for -stable. This code hasn't had the +normal external testing... + + arch/x86_64/kernel/pci-gart.c | 1 + + 1 file changed, 1 insertion(+) + +--- linux-2.6.15.1.orig/arch/x86_64/kernel/pci-gart.c ++++ linux-2.6.15.1/arch/x86_64/kernel/pci-gart.c +@@ -244,6 +244,7 @@ dma_alloc_coherent(struct device *dev, s + get_order(size)); + + if (swiotlb) { ++ gfp &= ~(GFP_DMA32|GFP_DMA); + return + swiotlb_alloc_coherent(dev, size, + dma_handle, diff --git a/queue/series b/queue/series index 63f8dd271cc..738fa17236a 100644 --- a/queue/series +++ b/queue/series @@ -6,3 +6,4 @@ fix-oops-in-ufs_fill_super-at-mount-time.patch elevator-as-back-compatibility.patch sparc64-fix-timekeeping-on-ultra-IIe-machines.patch net-make-second-arg-to-skb_reserved-signed.patch +mask-off-GFP-flags-before-swiotlb_alloc_coherent.patch