Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339312 > unrolled thread
| Started by | Wang Yufen <wangyufen@huawei.com> |
|---|---|
| First post | 2016-02-22 11:10 +0100 |
| Last post | 2016-02-22 13:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] trace/irq: fix WARNING in check_flags while CONFIG_TRACE_IRQFLAGS opened Wang Yufen <wangyufen@huawei.com> - 2016-02-22 11:10 +0100
Re: [PATCH] trace/irq: fix WARNING in check_flags while CONFIG_TRACE_IRQFLAGS opened Peter Zijlstra <peterz@infradead.org> - 2016-02-22 13:30 +0100
| From | Wang Yufen <wangyufen@huawei.com> |
|---|---|
| Date | 2016-02-22 11:10 +0100 |
| Subject | [PATCH] trace/irq: fix WARNING in check_flags while CONFIG_TRACE_IRQFLAGS opened |
| Message-ID | <r4VBi-42I-35@gated-at.bofh.it> |
if CONFIG_TRACE_IRQFLAGS opened, we got that warning: [ 214.078880] ------------[ cut here ]------------ [ 214.083521] WARNING: CPU: 4 PID: 1 at kernel/locking/lockdep.c:3557 check_flags.part.40+0x1c0/0x1d0() [ 214.092778] DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled) [ 214.098110] Modules linked in: [ 214.101373] CPU: 4 PID: 1 Comm: systemd Tainted: G W 4.1.15+ #15 [ 214.108537] Hardware name: Hisilicon Hi1610 16core Pangea Board (DT) [ 214.114916] Call trace: [ 214.117373] [<ffffffc00008af10>] dump_backtrace+0x0/0x1a0 [ 214.122794] [<ffffffc00008b0d0>] show_stack+0x20/0x30 [ 214.127867] [<ffffffc000b53454>] dump_stack+0x8c/0xb8 [ 214.132939] [<ffffffc0000c2308>] warn_slowpath_common+0xa8/0xe0 [ 214.138882] [<ffffffc0000c23b4>] warn_slowpath_fmt+0x74/0xa0 [ 214.144563] [<ffffffc000121c20>] check_flags.part.40+0x1c0/0x1d0 [ 214.150594] [<ffffffc000122760>] lock_is_held+0x80/0xa0 [ 214.155839] [<ffffffc00015125c>] rcu_note_context_switch+0x3dc/0x410 [ 214.162219] [<ffffffc000b57dcc>] __schedule+0x5c/0xb00 [ 214.167377] [<ffffffc000b588b0>] schedule+0x40/0xa0 [ 214.172272] ---[ end trace 2d1dc460f8460cd7 ]--- [ 214.176906] possible reason: unannotated irqs-off. It's because irqflags is not the same as current->hardirqs_enabled, I think maybe use local_irq_XXX to instead raw_local_irq_XXX can fix that warning Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: Ma Jun <majun258@huawei.com> --- kernel/locking/lockdep.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 716547f..1ed8b35 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -3620,13 +3620,13 @@ int lock_is_held(struct lockdep_map *lock) if (unlikely(current->lockdep_recursion)) return 1; /* avoid false negative lockdep_assert_held() */ - raw_local_irq_save(flags); + local_irq_save(flags); check_flags(flags); current->lockdep_recursion = 1; ret = __lock_is_held(lock); current->lockdep_recursion = 0; - raw_local_irq_restore(flags); + local_irq_restore(flags); return ret; } -- 1.7.1
[toc] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-02-22 13:30 +0100 |
| Subject | Re: [PATCH] trace/irq: fix WARNING in check_flags while CONFIG_TRACE_IRQFLAGS opened |
| Message-ID | <r4XMK-5Nd-15@gated-at.bofh.it> |
| In reply to | #1339312 |
On Mon, Feb 22, 2016 at 06:06:45PM +0800, Wang Yufen wrote: > if CONFIG_TRACE_IRQFLAGS opened, we got that warning: > [ 214.078880] ------------[ cut here ]------------ > > [ 214.083521] WARNING: CPU: 4 PID: 1 at kernel/locking/lockdep.c:3557 > check_flags.part.40+0x1c0/0x1d0() I'm not entirely sure how to open a CONFIG_ symbol, but when I have it enabled, I do not get this warning. So your report is missing some critical information.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web