Andy Getzendanner 77c1ff3982 vgaarb: fix incorrect dereference of userspace pointer.
This patch corrects a userspace pointer dereference in the VGA arbiter
in 2.6.32.1.

copy_from_user() is used at line 822 to copy the contents of buf into
kbuf, but a call to strncmp() on line 964 uses buf rather than kbuf.  This
problem led to a GPF in strncmp() when X was started on my x86_32 systems.
 X triggered the behavior with a write of "target PCI:0000:01:00.0" to
/dev/vga_arbiter.

The patch has been tested against 2.6.32.1 and observed to correct the GPF
observed when starting X or manually writing the string "target
PCI:0000:01:00.0" to /dev/vga_arbiter.

Signed-off-by: Andy Getzendanner <james.getzendanner@students.olin.edu>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-11 14:04:48 +10:00
..
2010-02-07 10:26:01 -08:00
2009-12-15 08:53:34 -08:00
2010-01-26 22:22:27 -05:00
2010-01-29 21:03:09 +01:00
2010-02-08 22:44:18 -08:00
2009-12-09 17:14:38 +11:00
2010-01-20 01:23:27 -05:00
2010-02-02 18:11:21 -08:00
2009-12-15 08:53:25 -08:00
2010-01-13 10:01:35 +00:00