lkml.org 
[lkml]   [2013]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG: using smp_processor_id() in preemptible [00000000] code: asm/8267
On Sun, Mar 24, 2013 at 12:55:56PM +0100, Borislav Petkov wrote:
> Hi,
>
> so I was tracing a small .c program like so:
>
> $ ./perf record ~/test/asm
>
> and here's what got spewed in dmesg. Kernel is plain -rc4. Any pending
> fixes in tip I should try?
>
> [ 3700.194208] BUG: using smp_processor_id() in preemptible [00000000] code: asm/8333
> [ 3700.194226] caller is perf_event_task_ctx+0x55/0x140

Ok, here's the call stack I was able to reconstruct:

perf_event_exit_task()
|->perf_event_exit_task_context()
|-> perf_event_task()
|-> perf_event_task_event()
|-> perf_event_task_ctx()
|-> perf_event_task_match()
|-> event_filter_match()
|-> smp_processor_id() -> debug_smp_processor_id()

Now, my primitive thinking would presume that since we're on the
exit_task path, we're still on the same cpu so the check triggers
wrongly but I don't know for sure. Also, is there any possibility for
this code to be moved somewhere else, i.e. to another cpu, so that the
check actually is correct?

Hmm.

Adding Stephane who added that check in
fa66f07aa1f0950e1dc78b7ab39728b3f8aa77a1.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2013-03-24 17:21    [W:1.301 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site