Skip to content

Commit cfb6133

Browse files
Peter Zijlstraingomolnar
authored andcommitted
locking/selftest: Remove the bad unlock ordering test
There is no such thing as a bad unlock order. Signed-off-by: Peter 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: Ingo Molnar <mingo@kernel.org>
1 parent f569478 commit cfb6133

1 file changed

Lines changed: 0 additions & 29 deletions

File tree

‎lib/locking-selftest.c‎

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -515,34 +515,6 @@ GENERATE_TESTCASE(double_unlock_rsem)
515515

516516
#undef E
517517

518-
/*
519-
* Bad unlock ordering:
520-
*/
521-
#define E() \
522-
\
523-
LOCK(A); \
524-
LOCK(B); \
525-
UNLOCK(A); /* fail */ \
526-
UNLOCK(B);
527-
528-
/*
529-
* 6 testcases:
530-
*/
531-
#include "locking-selftest-spin.h"
532-
GENERATE_TESTCASE(bad_unlock_order_spin)
533-
#include "locking-selftest-wlock.h"
534-
GENERATE_TESTCASE(bad_unlock_order_wlock)
535-
#include "locking-selftest-rlock.h"
536-
GENERATE_TESTCASE(bad_unlock_order_rlock)
537-
#include "locking-selftest-mutex.h"
538-
GENERATE_TESTCASE(bad_unlock_order_mutex)
539-
#include "locking-selftest-wsem.h"
540-
GENERATE_TESTCASE(bad_unlock_order_wsem)
541-
#include "locking-selftest-rsem.h"
542-
GENERATE_TESTCASE(bad_unlock_order_rsem)
543-
544-
#undef E
545-
546518
/*
547519
* initializing a held lock:
548520
*/
@@ -1825,7 +1797,6 @@ void locking_selftest(void)
18251797
DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA);
18261798
DO_TESTCASE_6("double unlock", double_unlock);
18271799
DO_TESTCASE_6("initialize held", init_held);
1828-
DO_TESTCASE_6_SUCCESS("bad unlock order", bad_unlock_order);
18291800

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

0 commit comments

Comments
 (0)