aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt/keyboard.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-10 03:59:23 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-12 13:21:55 -0400
commit82896210aa3c59eaa4f78f7ba2f5f947601dd8f8 (patch)
tree947b027ea02d9cf0545f7296ead4407e58e087b8 /drivers/tty/vt/keyboard.c
parent9abac8537c2cf435b251ca61e632d6a70a84077e (diff)
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/vt/keyboard.c')
-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,
1863 return -EPERM; 1863 return -EPERM;
1864 } 1864 }
1865 key_maps[s] = new_map; 1865 key_maps[s] = new_map;
1866 key_map = new_map;
1866 key_map[0] = U(K_ALLOCATED); 1867 key_map[0] = U(K_ALLOCATED);
1867 for (j = 1; j < NR_KEYS; j++) 1868 for (j = 1; j < NR_KEYS; j++)
1868 key_map[j] = U(K_HOLE); 1869 key_map[j] = U(K_HOLE);