diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-02-09 09:30:03 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-02-10 14:44:39 +0100 |
commit | c8cc7e853192d520ab6a5957f5081034103587ae (patch) | |
tree | ae0dc1b3bf4c4a6e50b92664ed485db143b6ce52 /kernel/locking/irqflag-debug.c | |
parent | locking/lockdep: Avoid unmatched unlock (diff) | |
download | linux-c8cc7e853192d520ab6a5957f5081034103587ae.tar.xz linux-c8cc7e853192d520ab6a5957f5081034103587ae.zip |
lockdep: Noinstr annotate warn_bogus_irq_restore()
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>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Link: https://lkml.kernel.org/r/YCKyYg53mMp4E7YI@hirez.programming.kicks-ass.net
Diffstat (limited to 'kernel/locking/irqflag-debug.c')
-rw-r--r-- | kernel/locking/irqflag-debug.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/locking/irqflag-debug.c b/kernel/locking/irqflag-debug.c index 9603d207a4ca..810b50344d35 100644 --- a/kernel/locking/irqflag-debug.c +++ b/kernel/locking/irqflag-debug.c @@ -4,8 +4,10 @@ #include <linux/export.h> #include <linux/irqflags.h> -void warn_bogus_irq_restore(void) +noinstr void warn_bogus_irq_restore(void) { + instrumentation_begin(); WARN_ONCE(1, "raw_local_irq_restore() called with IRQs enabled\n"); + instrumentation_end(); } EXPORT_SYMBOL(warn_bogus_irq_restore); |