aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/unaligned.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/unaligned.c')
-rw-r--r--arch/ia64/kernel/unaligned.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c
index 622772b7fb6c..e7ae6088350a 100644
--- a/arch/ia64/kernel/unaligned.c
+++ b/arch/ia64/kernel/unaligned.c
@@ -1336,8 +1336,11 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
1336 * Don't call tty_write_message() if we're in the kernel; we might 1336 * Don't call tty_write_message() if we're in the kernel; we might
1337 * be holding locks... 1337 * be holding locks...
1338 */ 1338 */
1339 if (user_mode(regs)) 1339 if (user_mode(regs)) {
1340 tty_write_message(current->signal->tty, buf); 1340 struct tty_struct *tty = get_current_tty();
1341 tty_write_message(tty, buf);
1342 tty_kref_put(tty);
1343 }
1341 buf[len-1] = '\0'; /* drop '\r' */ 1344 buf[len-1] = '\0'; /* drop '\r' */
1342 /* watch for command names containing %s */ 1345 /* watch for command names containing %s */
1343 printk(KERN_WARNING "%s", buf); 1346 printk(KERN_WARNING "%s", buf);