[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YCJJAoC+r414zO+2@hirez.programming.kicks-ass.net>
Date: Tue, 9 Feb 2021 09:34:10 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Mark Rutland <mark.rutland@....com>
Subject: [PATCH] lockdep: Noinstr annotate warn_bogus_irq_restore()
Subject: lockdep: Noinstr annotate warn_bogus_irq_restore()
From: Peter Zijlstra <peterz@...radead.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@...radead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
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)
Powered by blists - more mailing lists