]> git.karo-electronics.de Git - karo-tx-linux.git/commit
intel-agp: fix a panic with 1M of shared memory, no GTT entries
authorLubomir Rintel <lkundrak@v3.sk>
Tue, 10 Mar 2009 19:55:54 +0000 (12:55 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Mar 2009 00:52:53 +0000 (17:52 -0700)
commitd4ba53db2ea845ac7cad8a56d8fc40f1d8c250f4
treeadaef0b96c6122533b25688253b93c8400d16e6e
parent05965d62aff80fc6eef713e768ff4650aaf7af5c
intel-agp: fix a panic with 1M of shared memory, no GTT entries

commit 9c1e8a4ebcc04226cb6f3a1bf1d72f4cafd6b089 upstream.

When GTT size is equal to amount of video memory, the amount of GTT
entries is computed lower than zero, which is invalid and leads to
off-by-one error in intel_i915_configure()

Originally posted here:
http://bugzilla.kernel.org/show_bug.cgi?id=12539
http://bugzilla.redhat.com/show_bug.cgi?id=445592

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: Dave Airlie <airlied@linux.ie>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/agp/intel-agp.c