From: Peter Zijlstra Date: Wed, 31 May 2017 15:05:46 +0000 (+0200) Subject: locking/selftest: Remove the bad unlock ordering test X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cfb6133399a490419cda55fcdcf9dbbca65eacba;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git locking/selftest: Remove the bad unlock ordering test There is no such thing as a bad unlock order. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index f3a217ea0388..dd09e517c492 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -515,34 +515,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: */ @@ -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");