lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150318091236.GL23123@twins.programming.kicks-ass.net>
Date:	Wed, 18 Mar 2015 10:12:36 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Huang Ying <ying.huang@...el.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, LKP ML <lkp@...org>
Subject: Re: [LKP] [lockdep] ef9db2383c7: WARNING: CPU: 0 PID: 1 at
 kernel/locking/lockdep.c:3538 check_flags+0x22d/0x240()

On Wed, Mar 18, 2015 at 04:15:07PM +0800, Huang Ying wrote:
> [    0.043211] ------------[ cut here ]------------
> [    0.043778] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:3538 check_flags+0x22d/0x240()
> [    0.044000] DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled)

> [    0.044000]  [<ffffffff8111659d>] check_flags+0x22d/0x240
> [    0.044000]  [<ffffffff81117636>] lock_is_held+0x36/0x90
> [    0.044000]  [<ffffffff81129ce5>] rcu_read_lock_held+0x65/0x70
> [    0.044000]  [<ffffffff81117d16>] lockdep_init_map+0x336/0x6f0

I'm not entirely sure how we get from lockdep_init_map() into
rcu_read_lock_held() without going through another call like
is_module_address().

But the error is clear enough; I added the below on top of this patch.

Thanks!

---
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2996,8 +2996,13 @@ void lockdep_init_map(struct lockdep_map
 	if (subclass) {
 		unsigned long flags;
 
+		if (DEBUG_LOCKS_WARN_ON(current->lockdep_recursion))
+			return;
+
 		raw_local_irq_save(flags);
+		current->lockdep_recursion = 1;
 		register_lock_class(lock, subclass, 1);
+		current->lockdep_recursion = 0;
 		raw_local_irq_restore(flags);
 	}
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ