Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfb61333 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

locking/selftest: Remove the bad unlock ordering test



There is no such thing as a bad unlock order.

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent f5694788
Loading
Loading
Loading
Loading
+0 −29
Original line number Original line Diff line number Diff line
@@ -515,34 +515,6 @@ GENERATE_TESTCASE(double_unlock_rsem)


#undef E
#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:
 * initializing a held lock:
 */
 */
@@ -1825,7 +1797,6 @@ void locking_selftest(void)
	DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA);
	DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA);
	DO_TESTCASE_6("double unlock", double_unlock);
	DO_TESTCASE_6("double unlock", double_unlock);
	DO_TESTCASE_6("initialize held", init_held);
	DO_TESTCASE_6("initialize held", init_held);
	DO_TESTCASE_6_SUCCESS("bad unlock order", bad_unlock_order);


	printk("  --------------------------------------------------------------------------\n");
	printk("  --------------------------------------------------------------------------\n");
	print_testname("recursive read-lock");
	print_testname("recursive read-lock");