From: Dan Carpenter Date: Sat, 10 Mar 2012 08:59:23 +0000 (+0300) Subject: vt: NULL dereference in vt_do_kdsk_ioctl() X-Git-Tag: upstream/snapshot3+hdmi~7962^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82896210aa3c59eaa4f78f7ba2f5f947601dd8f8;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 70d0593..86dd1e3 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);