From: David Moore Date: Sun, 4 Feb 2007 18:39:40 +0000 (-0500) Subject: Missing critical phys_to_virt in lib/swiotlb.c X-Git-Tag: v2.6.20.2~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e16b67f9a0ac6d9f89f680b7f3b439abfb1dac5e;p=thirdparty%2Fkernel%2Fstable.git Missing critical phys_to_virt in lib/swiotlb.c Missing critical phys_to_virt in lib/swiotlb.c 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. Affected are especially Intel x86_64 machines with more than about 3 GB RAM. Signed-off-by: David Moore Signed-off-by: Stefan Richter Signed-off-by: Greg Kroah-Hartman --- diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 10625785eefd9..d6d57fb475e3c 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -750,7 +750,7 @@ swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sg, 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); }