Commit 82896210 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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 079c9534 "vt:tackle kbd_table".
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9abac853
...@@ -1863,6 +1863,7 @@ int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, ...@@ -1863,6 +1863,7 @@ int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm,
return -EPERM; return -EPERM;
} }
key_maps[s] = new_map; key_maps[s] = new_map;
key_map = new_map;
key_map[0] = U(K_ALLOCATED); key_map[0] = U(K_ALLOCATED);
for (j = 1; j < NR_KEYS; j++) for (j = 1; j < NR_KEYS; j++)
key_map[j] = U(K_HOLE); key_map[j] = U(K_HOLE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment