lkml.org 
[lkml]   [2020]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on
On Thu, 22 Oct 2020 12:30:28 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> Subject: lockdep: Fix preemption WARN for spurious IRQ-enable
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Thu Oct 22 12:23:02 CEST 2020
>
> It is valid (albeit uncommon) to call local_irq_enable() without first
> having called local_irq_disable(). In this case we enter
> lockdep_hardirqs_on*() with IRQs enabled and trip a preemption warning
> for using __this_cpu_read().
>
> Use this_cpu_read() instead to avoid the warning.

I was wondering why you were using __this_cpu_read() in the first place.

Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve


>
> Fixes: 4d004099a6 ("lockdep: Fix lockdep recursion")
> Reported-by: syzbot+53f8ce8bbc07924b6417@syzkaller.appspotmail.com
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

\
 
 \ /
  Last update: 2020-10-22 22:33    [W:0.213 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site