patch-2.4.0-test5 linux/arch/ia64/kernel/unaligned.c
Next file: linux/arch/ia64/kernel/unwind.c
Previous file: linux/arch/ia64/kernel/time.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Fri Jul 14 16:08:12 2000
- Orig file:
v2.4.0-test4/linux/arch/ia64/kernel/unaligned.c
- Orig date:
Fri Jun 23 21:55:07 2000
diff -u --recursive --new-file v2.4.0-test4/linux/arch/ia64/kernel/unaligned.c linux/arch/ia64/kernel/unaligned.c
@@ -1428,9 +1428,15 @@
if (unalign_count > 5 && jiffies - last_time > 5*HZ)
unalign_count = 0;
if (++unalign_count < 5) {
+ char buf[200]; /* comm[] is at most 16 bytes... */
+ size_t len;
+
last_time = jiffies;
- printk("%s(%d): unaligned trap accessing %016lx (ip=%016lx)\n",
- current->comm, current->pid, ifa, regs->cr_iip + ipsr->ri);
+ len = sprintf(buf, "%s(%d): unaligned access to 0x%016lx, ip=0x%016lx\n\r",
+ current->comm, current->pid, ifa, regs->cr_iip + ipsr->ri);
+ tty_write_message(current->tty, buf);
+ buf[len-1] = '\0'; /* drop '\r' */
+ printk("%s", buf); /* guard against command names containing %s!! */
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)