]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
block bounce buffer fix, fwd from Andi
authorChris Wright <chrisw@sous-sol.org>
Fri, 30 Jun 2006 01:59:19 +0000 (18:59 -0700)
committerChris Wright <chrisw@sous-sol.org>
Fri, 30 Jun 2006 01:59:19 +0000 (18:59 -0700)
queue-2.6.17/block-fix-bounce-limit-address-check.patch [new file with mode: 0644]
queue-2.6.17/series

diff --git a/queue-2.6.17/block-fix-bounce-limit-address-check.patch b/queue-2.6.17/block-fix-bounce-limit-address-check.patch
new file mode 100644 (file)
index 0000000..404c216
--- /dev/null
@@ -0,0 +1,33 @@
+From stable-bounces@linux.kernel.org  Thu Jun 29 13:14:55 2006
+Date: Thu, 29 Jun 2006 20:54:26 +0200
+From: Andi Kleen <ak@suse.de>
+To: stable@kernel.org
+Cc: axboe@suse.de
+Subject: BLOCK: Fix bounce limit address check
+
+
+This fixes some OOMs on 64bit systems with <4GB of RAM when accessing
+the cdrom. 
+
+Do a safer check for when to enable DMA. Currently we enable ISA DMA
+for cases that do not need it, resulting in OOM conditions when ZONE_DMA
+runs out of space.
+
+Signed-off-by: Andi Kleen <ak@suse.de>
+Signed-off-by: Jens Axboe <axboe@suse.de>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ block/ll_rw_blk.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.17.2.orig/block/ll_rw_blk.c
++++ linux-2.6.17.2/block/ll_rw_blk.c
+@@ -638,7 +638,7 @@ void blk_queue_bounce_limit(request_queu
+       /* Assume anything <= 4GB can be handled by IOMMU.
+          Actually some IOMMUs can handle everything, but I don't
+          know of a way to test this here. */
+-      if (bounce_pfn < (0xffffffff>>PAGE_SHIFT))
++      if (bounce_pfn < (min_t(u64,0xffffffff,BLK_BOUNCE_HIGH) >> PAGE_SHIFT))
+               dma = 1;
+       q->bounce_pfn = max_low_pfn;
+ #else
index 2519d3528b1c163cc78abc72db1ec3f056fea0b8..3ff316bf8457f92a2d046ec8a0c46781618103e9 100644 (file)
@@ -1,3 +1,4 @@
 xfs-corruption-fix-for-next-stable-release.patch
 ib-mthca-restore-missing-pci-registers-after-reset.patch
 x86_64-fix-modular-pc-speaker.patch
+block-fix-bounce-limit-address-check.patch