aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-10 11:59:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-12 10:21:55 -0700
commit82896210aa3c59eaa4f78f7ba2f5f947601dd8f8 (patch)
tree947b027ea02d9cf0545f7296ead4407e58e087b8 /drivers/tty
parenttty: serial: vt8500: fix annotations for probe/remove (diff)
downloadlinux-dev-82896210aa3c59eaa4f78f7ba2f5f947601dd8f8.tar.xz
linux-dev-82896210aa3c59eaa4f78f7ba2f5f947601dd8f8.zip
vt: NULL dereference in vt_do_kdsk_ioctl()
We forgot to set the "key_map" variable here, so it's still NULL. This was introduced recently in 079c9534a9 "vt:tackle kbd_table". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/vt/keyboard.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 70d0593d3bc6..86dd1e302bb3 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1863,6 +1863,7 @@ int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm,
return -EPERM;
}
key_maps[s] = new_map;
+ key_map = new_map;
key_map[0] = U(K_ALLOCATED);
for (j = 1; j < NR_KEYS; j++)
key_map[j] = U(K_HOLE);