lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lockdep: Noinstr annotate warn_bogus_irq_restore()
On Tue, Feb 09, 2021 at 09:34:10AM +0100, Peter Zijlstra wrote:
>
> Subject: lockdep: Noinstr annotate warn_bogus_irq_restore()
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Tue Feb 9 09:30:03 CET 2021
>
> vmlinux.o: warning: objtool: lock_is_held_type()+0x107: call to warn_bogus_irq_restore() leaves .noinstr.text section
>
> As per the general rule that WARNs are allowed to violate noinstr to
> get out, annotate it away.
>
> Fixes: 997acaf6b4b5 ("lockdep: report broken irq restoration")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Whoops; sorry for missing that!

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
> include/linux/irqflags.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> --- a/include/linux/irqflags.h
> +++ b/include/linux/irqflags.h
> @@ -153,8 +153,11 @@ do { \
> extern void warn_bogus_irq_restore(void);
> #define raw_check_bogus_irq_restore() \
> do { \
> - if (unlikely(!arch_irqs_disabled())) \
> + if (unlikely(!arch_irqs_disabled())) { \
> + instrumentation_begin(); \
> warn_bogus_irq_restore(); \
> + instrumentation_end(); \
> + } \
> } while (0)
> #else
> #define raw_check_bogus_irq_restore() do { } while (0)

\
 
 \ /
  Last update: 2021-02-09 14:26    [W:0.229 / U:5.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site