mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: mingo@kernel.org, tglx@linutronix.de, rostedt@goodmis.org,
	bigeasy@linutronix.de
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org
Subject: [RFC][PATCH 2/3] locking/selftest: Remove the bad unlock ordering test
Date: Wed, 31 May 2017 17:16:14 +0200	[thread overview]
Message-ID: <20170531152019.671439590@infradead.org> (raw)
In-Reply-To: <20170531151612.797882111@infradead.org>

[-- Attachment #1: peterz-locking-selftest-remove-unlock-order.patch --]
[-- Type: text/plain, Size: 1445 bytes --]

There is no such thing as a bad unlock order.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 lib/locking-selftest.c |   29 -----------------------------
 1 file changed, 29 deletions(-)

--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -516,34 +516,6 @@ GENERATE_TESTCASE(double_unlock_rsem)
 #undef E
 
 /*
- * Bad unlock ordering:
- */
-#define E()					\
-						\
-	LOCK(A);				\
-	LOCK(B);				\
-	UNLOCK(A); /* fail */			\
-	UNLOCK(B);
-
-/*
- * 6 testcases:
- */
-#include "locking-selftest-spin.h"
-GENERATE_TESTCASE(bad_unlock_order_spin)
-#include "locking-selftest-wlock.h"
-GENERATE_TESTCASE(bad_unlock_order_wlock)
-#include "locking-selftest-rlock.h"
-GENERATE_TESTCASE(bad_unlock_order_rlock)
-#include "locking-selftest-mutex.h"
-GENERATE_TESTCASE(bad_unlock_order_mutex)
-#include "locking-selftest-wsem.h"
-GENERATE_TESTCASE(bad_unlock_order_wsem)
-#include "locking-selftest-rsem.h"
-GENERATE_TESTCASE(bad_unlock_order_rsem)
-
-#undef E
-
-/*
  * initializing a held lock:
  */
 #define E()					\
@@ -1825,7 +1797,6 @@ void locking_selftest(void)
 	DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA);
 	DO_TESTCASE_6("double unlock", double_unlock);
 	DO_TESTCASE_6("initialize held", init_held);
-	DO_TESTCASE_6_SUCCESS("bad unlock order", bad_unlock_order);
 
 	printk("  --------------------------------------------------------------------------\n");
 	print_testname("recursive read-lock");

  parent reply	other threads:[~2017-05-31 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 15:16 [RFC][PATCH 0/3] rt_mutex: Add lockdep annotations Peter Zijlstra
2017-05-31 15:16 ` [RFC][PATCH 1/3] " Peter Zijlstra
2017-06-04 14:26   ` Thomas Gleixner
2017-06-06  8:18     ` Peter Zijlstra
2017-05-31 15:16 ` Peter Zijlstra [this message]
2017-05-31 15:16 ` [RFC][PATCH 3/3] locking/selftest: Add RT-mutex support Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170531152019.671439590@infradead.org \
    --to=peterz@infradead.org \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®