]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Mar 2009 22:55:11 +0000 (15:55 -0700)
commit4e6e4624fb3f4a9f7a8588f7fcc08aed1de4fb44
tree30a76767516304283f29d1997cd6a285e39d160a
parentf2250fda1d93fbadbc192307545c98e1281c87f9
intel-agp: fix a panic with 1M of shared memory, no GTT entries

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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/agp/intel-agp.c