[PATCH 2.6.0-test11] agpgart [amd64] fix (off by one)
From: Brad House (brad_mssw_at_gentoo.org)
Date: 11/30/03
- Previous message: Geert Uytterhoeven: "2.4.23 and CONFIG_PROC_FS=n"
- Next in thread: Dave Jones: "Re: [PATCH 2.6.0-test11] agpgart [amd64] fix (off by one)"
- Reply: Dave Jones: "Re: [PATCH 2.6.0-test11] agpgart [amd64] fix (off by one)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Nov 2003 14:14:54 -0500 (EST) To: <linux-kernel@vger.kernel.org>
AGPGart would report "Too many northbridges" without this
patch. The problem was that 'i' was incremented before being
checked against the MAX GARTS, just making the check > instead
of == fixes the problems. Patch here:
http://dev.gentoo.org/~brad_mssw/kernel_patches/2.6.0/genpatches-0.7/101_amd64_agpgart_fix.patch
Also inlined below.
Please CC me on any replies
-Brad House
brad_mssw@gentoo.org
diff -ruN linux-2.6.0-test11.old/drivers/char/agp/amd64-agp.c
linux-2.6.0-test11/drivers/char/agp/amd64-agp.c
--- linux-2.6.0-test11.old/drivers/char/agp/amd64-agp.c 2003-11-26
15:44:44.000000000 -0500
+++ linux-2.6.0-test11/drivers/char/agp/amd64-agp.c 2003-11-30
14:07:38.690330488 -0500
@@ -357,7 +357,7 @@
}
hammers[i++] = loop_dev;
nr_garts = i;
- if (i == MAX_HAMMER_GARTS) {
+ if (nr_garts > MAX_HAMMER_GARTS) {
printk(KERN_INFO PFX "Too many northbridges for AGP\n");
return -1;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Geert Uytterhoeven: "2.4.23 and CONFIG_PROC_FS=n"
- Next in thread: Dave Jones: "Re: [PATCH 2.6.0-test11] agpgart [amd64] fix (off by one)"
- Reply: Dave Jones: "Re: [PATCH 2.6.0-test11] agpgart [amd64] fix (off by one)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|