]> Pileus Git - ~andy/linux/blobdiff - drivers/tty/sysrq.c
Merge branch 'stable/autoballoon.v5.2' into stable/for-linus-3.5
[~andy/linux] / drivers / tty / sysrq.c
index 7867b7c4538e1cb02b7b4192f53f2f6783bed104..05728894a88c23330e7b57eb8994f50477fc1b73 100644 (file)
@@ -110,11 +110,9 @@ static struct sysrq_key_op sysrq_SAK_op = {
 #ifdef CONFIG_VT
 static void sysrq_handle_unraw(int key)
 {
-       struct kbd_struct *kbd = &kbd_table[fg_console];
-
-       if (kbd)
-               kbd->kbdmode = default_utf8 ? VC_UNICODE : VC_XLATE;
+       vt_reset_unicode(fg_console);
 }
+
 static struct sysrq_key_op sysrq_unraw_op = {
        .handler        = sysrq_handle_unraw,
        .help_msg       = "unRaw",
@@ -322,11 +320,16 @@ static void send_sig_all(int sig)
 {
        struct task_struct *p;
 
+       read_lock(&tasklist_lock);
        for_each_process(p) {
-               if (p->mm && !is_global_init(p))
-                       /* Not swapper, init nor kernel thread */
-                       force_sig(sig, p);
+               if (p->flags & PF_KTHREAD)
+                       continue;
+               if (is_global_init(p))
+                       continue;
+
+               do_send_sig_info(sig, SEND_SIG_FORCED, p, true);
        }
+       read_unlock(&tasklist_lock);
 }
 
 static void sysrq_handle_term(int key)
@@ -343,7 +346,7 @@ static struct sysrq_key_op sysrq_term_op = {
 
 static void moom_callback(struct work_struct *ignored)
 {
-       out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL);
+       out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL, true);
 }
 
 static DECLARE_WORK(moom_work, moom_callback);