]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/ia64/kernel/unaligned.c
Merge git://www.linux-watchdog.org/linux-watchdog
[karo-tx-linux.git] / arch / ia64 / kernel / unaligned.c
index 622772b7fb6c48633624803223f0e601085670b2..e7ae6088350acddbb36d8e2fd04f2bc177668c09 100644 (file)
@@ -1336,8 +1336,11 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
                         * Don't call tty_write_message() if we're in the kernel; we might
                         * be holding locks...
                         */
-                       if (user_mode(regs))
-                               tty_write_message(current->signal->tty, buf);
+                       if (user_mode(regs)) {
+                               struct tty_struct *tty = get_current_tty();
+                               tty_write_message(tty, buf);
+                               tty_kref_put(tty);
+                       }
                        buf[len-1] = '\0';      /* drop '\r' */
                        /* watch for command names containing %s */
                        printk(KERN_WARNING "%s", buf);