]>
Commit | Line | Data |
---|---|---|
2bb74eb3 | 1 | From stable-bounces@linux.kernel.org Sun Feb 4 12:37:49 2007 |
d3573c90 GKH |
2 | From: David Moore <dcm@acm.org> |
3 | Date: Sun, 04 Feb 2007 13:39:40 -0500 | |
2bb74eb3 GKH |
4 | Subject: Missing critical phys_to_virt in lib/swiotlb.c |
5 | To: stable@kernel.org | |
6 | Cc: discuss@x86-64.org, Jan Beulich <jbeulich@novell.com>, David Moore <dcm@MIT.EDU>, akpm@linux-foundation.org, linux1394-devel <linux1394-devel@lists.sourceforge.net> | |
7 | Message-ID: <45C643BF.80204@s5r6.in-berlin.de> | |
8 | ||
d3573c90 | 9 | From: David Moore <dcm@acm.org> |
2bb74eb3 | 10 | |
d3573c90 | 11 | Missing critical phys_to_virt in lib/swiotlb.c |
2bb74eb3 | 12 | |
d3573c90 GKH |
13 | Adds missing call to phys_to_virt() in the |
14 | lib/swiotlb.c:swiotlb_sync_sg() function. Without this change, a kernel | |
15 | panic will always occur whenever a SWIOTLB bounce buffer from a | |
16 | scatter-gather list gets synced. Affected are especially Intel x86_64 | |
17 | machines with more than about 3 GB RAM. | |
2bb74eb3 | 18 | |
d3573c90 GKH |
19 | Signed-off-by: David Moore <dcm@acm.org> |
20 | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> | |
2bb74eb3 GKH |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
22 | ||
23 | --- | |
24 | lib/swiotlb.c | 2 +- | |
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
26 | ||
27 | --- linux-2.6.20.1.orig/lib/swiotlb.c | |
28 | +++ linux-2.6.20.1/lib/swiotlb.c | |
29 | @@ -750,7 +750,7 @@ swiotlb_sync_sg(struct device *hwdev, st | |
30 | ||
31 | for (i = 0; i < nelems; i++, sg++) | |
32 | if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg)) | |
33 | - sync_single(hwdev, (void *) sg->dma_address, | |
34 | + sync_single(hwdev, phys_to_virt(sg->dma_address), | |
35 | sg->dma_length, dir, target); | |
36 | } | |
37 |