From: Michael Gehring Date: Wed, 21 Mar 2012 00:26:45 +0000 (+0100) Subject: tty/vt: handle bad user buffer in {G,P}IO_CMAP ioctl X-Git-Tag: v3.5-rc1~146^2~30^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=871bdea6f8c64517635bec352b8bec6b72a26d80;p=pandora-kernel.git tty/vt: handle bad user buffer in {G,P}IO_CMAP ioctl set_get_cmap() ignored the result of {get,put}_user(), causing ioctl(vt, {G,P}IO_CMAP, 0xdeadbeef) to silently fail. Another side effect of this: calling the PIO_CMAP ioctl with an invalid buffer would zero the default colormap and the palette for all vts (all colors set to black). Leave the default colormap intact and return -EFAULT when reading/writing to the userspace buffer fails. Signed-off-by: Michael Gehring Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed