diff options
Diffstat (limited to 'drivers/char/keyboard.c')
-rw-r--r-- | drivers/char/keyboard.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 3e90aac37510..99fb070fdbf8 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -108,7 +108,11 @@ const int NR_TYPES = ARRAY_SIZE(max_vals); | |||
108 | struct kbd_struct kbd_table[MAX_NR_CONSOLES]; | 108 | struct kbd_struct kbd_table[MAX_NR_CONSOLES]; |
109 | static struct kbd_struct *kbd = kbd_table; | 109 | static struct kbd_struct *kbd = kbd_table; |
110 | 110 | ||
111 | int spawnpid, spawnsig; | 111 | struct vt_spawn_console vt_spawn_con = { |
112 | .lock = SPIN_LOCK_UNLOCKED, | ||
113 | .pid = NULL, | ||
114 | .sig = 0, | ||
115 | }; | ||
112 | 116 | ||
113 | /* | 117 | /* |
114 | * Variables exported for vt.c | 118 | * Variables exported for vt.c |
@@ -578,9 +582,13 @@ static void fn_compose(struct vc_data *vc, struct pt_regs *regs) | |||
578 | 582 | ||
579 | static void fn_spawn_con(struct vc_data *vc, struct pt_regs *regs) | 583 | static void fn_spawn_con(struct vc_data *vc, struct pt_regs *regs) |
580 | { | 584 | { |
581 | if (spawnpid) | 585 | spin_lock(&vt_spawn_con.lock); |
582 | if (kill_proc(spawnpid, spawnsig, 1)) | 586 | if (vt_spawn_con.pid) |
583 | spawnpid = 0; | 587 | if (kill_pid(vt_spawn_con.pid, vt_spawn_con.sig, 1)) { |
588 | put_pid(vt_spawn_con.pid); | ||
589 | vt_spawn_con.pid = NULL; | ||
590 | } | ||
591 | spin_unlock(&vt_spawn_con.lock); | ||
584 | } | 592 | } |
585 | 593 | ||
586 | static void fn_SAK(struct vc_data *vc, struct pt_regs *regs) | 594 | static void fn_SAK(struct vc_data *vc, struct pt_regs *regs) |