Revert "ARM: tegra: tegratab: dummy change"
[linux-2.6.git] / drivers / tty / sysrq.c
index 43db715..0572889 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/module.h>
 #include <linux/suspend.h>
 #include <linux/writeback.h>
-#include <linux/buffer_head.h>         /* for fsync_bdev() */
 #include <linux/swap.h>
 #include <linux/spinlock.h>
 #include <linux/vt_kern.h>
@@ -41,6 +40,7 @@
 #include <linux/oom.h>
 #include <linux/slab.h>
 #include <linux/input.h>
+#include <linux/uaccess.h>
 
 #include <asm/ptrace.h>
 #include <asm/irq_regs.h>
@@ -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);