On Tue, 14 Mar 2017 10:00:07 +0800
Qi Hou <qi....@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);
>  

Reply via email to