mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
parisc: Show kernel unaligned memory accesses
Warn if some kernel function triggers unaligned memory accesses. Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
73cb4a2d8d
commit
94a1b19229
|
|
@ -399,6 +399,13 @@ void handle_unaligned(struct pt_regs *regs)
|
|||
|
||||
if (!unaligned_enabled)
|
||||
goto force_sigbus;
|
||||
} else {
|
||||
static DEFINE_RATELIMIT_STATE(kernel_ratelimit, 5 * HZ, 5);
|
||||
if (!(current->thread.flags & PARISC_UAC_NOPRINT) &&
|
||||
__ratelimit(&kernel_ratelimit))
|
||||
pr_warn("Kernel: unaligned access to " RFMT " in %pS "
|
||||
"(iir " RFMT ")\n",
|
||||
regs->ior, (void *)regs->iaoq[0], regs->iir);
|
||||
}
|
||||
|
||||
/* handle modification - OK, it's ugly, see the instruction manual */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user