lkml.org 
[lkml]   [2017]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lockdep: call time_hardirqs_off after clearing hardirqs_enabled
On Tue, 14 Mar 2017 10:00:07 +0800
Qi Hou <qi.hou@windriver.com> wrote:

> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 577f026..e8b35e4 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -2627,8 +2627,6 @@ __visible void trace_hardirqs_off_caller(unsigned long ip)
> {
> struct task_struct *curr = current;
>
> - time_hardirqs_off(CALLER_ADDR0, ip);
> -
> if (unlikely(!debug_locks || current->lockdep_recursion))
> return;

You do realize that this breaks irqsoff tracing if lockdep ever
triggers. Right?

-- Steve

>
> @@ -2649,6 +2647,8 @@ __visible void trace_hardirqs_off_caller(unsigned long ip)
> debug_atomic_inc(hardirqs_off_events);
> } else
> debug_atomic_inc(redundant_hardirqs_off);
> +
> + time_hardirqs_off(CALLER_ADDR0, ip);
> }
> EXPORT_SYMBOL(trace_hardirqs_off_caller);
>

\
 
 \ /
  Last update: 2017-03-14 04:05    [W:0.037 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site