LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [stable patch 2.6.20 1/3] Missing critical phys_to_virt in lib/swiotlb.c
@ 2007-02-09 23:40 Stefan Richter
  2007-02-09 23:41 ` [stable patch 2.6.20 2/3] ieee1394: video1394: DMA fix Stefan Richter
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2007-02-09 23:40 UTC (permalink / raw)
  To: stable; +Cc: linux-kernel, linux1394-devel

Date: Sun, 04 Feb 2007 13:39:40 -0500
From: David Moore <dcm@acm.org>

Adds missing call to phys_to_virt() in the
lib/swiotlb.c:swiotlb_sync_sg() function.  Without this change, a kernel
panic will always occur whenever a SWIOTLB bounce buffer from a
scatter-gather list gets synced.

Signed-off-by: David Moore <dcm@acm.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---

This is a fraction of patch "[IA64] swiotlb bug fixes" in 2.6.20-git#,
commit cde14bbfb3aa79b479db35bd29e6c083513d8614.  Unlike its heading
suggests, it is also important for EM64T.

Example crashes caused by swiotlb_sync_sg:
http://lists.opensuse.org/opensuse-bugs/2006-12/msg02943.html
http://qa.mandriva.com/show_bug.cgi?id=28224
http://www.pchdtv.com/forum/viewtopic.php?t=2063&sid=a959a14a4c2db0eebaab7b0df56103ce

--- linux-2.6.20.orig/lib/swiotlb.c	2007-02-04 13:18:41.000000000 -0500
+++ linux-2.6.20/lib/swiotlb.c	2007-02-04 13:19:43.000000000 -0500
@@ -750,7 +750,7 @@ swiotlb_sync_sg(struct device *hwdev, st
 
 	for (i = 0; i < nelems; i++, sg++)
 		if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
-			sync_single(hwdev, (void *) sg->dma_address,
+			sync_single(hwdev, phys_to_virt(sg->dma_address),
 				    sg->dma_length, dir, target);
 }
 

-- 
Stefan Richter
-=====-=-=== --=- -=-=-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-10  9:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 23:40 [stable patch 2.6.20 1/3] Missing critical phys_to_virt in lib/swiotlb.c Stefan Richter
2007-02-09 23:41 ` [stable patch 2.6.20 2/3] ieee1394: video1394: DMA fix Stefan Richter
2007-02-09 23:44   ` [stable patch 2.6.20 3/3] ieee1394: fix host device registering when nodemgr disabled Stefan Richter
2007-02-10  9:51   ` [stable patch 2.6.20 2/3] ieee1394: video1394: DMA fix Stefan Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).