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]
Date:   Thu, 2 Mar 2017 00:21:35 -0800
From:   tip-bot for Boqun Feng <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, Nicolai.Haehnle@....com,
        torvalds@...ux-foundation.org, hpa@...or.com, boqun.feng@...il.com,
        akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        peterz@...radead.org, paulmck@...ux.vnet.ibm.com,
        chris@...is-wilson.co.uk, fengguang.wu@...el.com,
        tglx@...utronix.de
Subject: [tip:locking/urgent] locking/ww_mutex: Adjust the lock number for
 stress test

Commit-ID:  857811a37129f5d2ba162d7be3986eff44724014
Gitweb:     http://git.kernel.org/tip/857811a37129f5d2ba162d7be3986eff44724014
Author:     Boqun Feng <boqun.feng@...il.com>
AuthorDate: Wed, 1 Mar 2017 23:01:38 +0800
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 2 Mar 2017 09:00:39 +0100

locking/ww_mutex: Adjust the lock number for stress test

Because there are only 12 bits in held_lock::references, so we only
support 4095 nested lock held in the same time, adjust the lock number
for ww_mutex stress test to kill one lockdep splat:

  [ ] [ BUG: bad unlock balance detected! ]
  [ ] kworker/u2:0/5 is trying to release lock (ww_class_mutex) at:
  [ ] ww_mutex_unlock()
  [ ] but there are no more locks to release!
  ...

Signed-off-by: Boqun Feng <boqun.feng@...il.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Chris Wilson <chris@...is-wilson.co.uk>
Cc: Fengguang Wu <fengguang.wu@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Nicolai Hähnle <Nicolai.Haehnle@....com>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20170301150138.hdixnmafzfsox7nn@tardis.cn.ibm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/locking/test-ww_mutex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c
index 3eb39c5..6b7abb3 100644
--- a/kernel/locking/test-ww_mutex.c
+++ b/kernel/locking/test-ww_mutex.c
@@ -627,7 +627,7 @@ static int __init test_ww_mutex_init(void)
 	if (ret)
 		return ret;
 
-	ret = stress(4096, hweight32(STRESS_ALL)*ncpus, 1<<12, STRESS_ALL);
+	ret = stress(4095, hweight32(STRESS_ALL)*ncpus, 1<<12, STRESS_ALL);
 	if (ret)
 		return ret;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ