Re: [BUG] percpu misaligned allocation

From: David Miller
Date: Thu Mar 18 2010 - 02:26:32 EST


From: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Date: Thu, 18 Mar 2010 05:49:33 +0100

> While using the lock events through perf in a sparc box, I can see
> the following message repeated many times:
>
> Kernel unaligned access at TPC[49357c] perf_trace_lock_acquire+0xb4/0x180
>
> It actually hangs the box as the messages are sent to a serial console.
>
> When used with perf, the trace events use a per cpu buffer allocated
> in kernel/trace/trace_event_perf.c, and the allocation appears to return
> a misaligned percpu pointer. It is aligned to 4 while it seems it
> requires to be aligned to 8.

Thanks I'll take a look at this.

RAW locks (both rwlocks and spinlocks) on sparc64 are 4-bytes
in size, maybe some piece of code is assuming that locks
are cpu word sized.

Where is perf_trace_lock_acquire() I can't find it in Linus's
tree? Does it get created by some crazy macro expansion?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/