[Devel] [PATCH RH9 30/33] ve/lockdep: Taint kernel on circular locking complains

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Thu Sep 23 22:08:33 MSK 2021


From: Vladimir Davydov <vdavydov at parallels.com>

Author: Konstantin Khorenko
Email: khorenko at parallels.com
Subject: lockdep: taint kernel on circular locking complains
Date: Mon, 23 Sep 2013 20:04:29 +0400

Currently our QA infrastructure cannot efficiently grep kernel logs
and analyze them thus lockdep complains are lost.

Let's taint kernel on lockdep complains - that way we will not miss
possible problems reported by lockdep.

This change is a subject to be rolled back when QA begins to parse kernel
logs.

Changes from v1:
* lockdep disables itself due do a number of reasons, we want to catch
  all of them => let's taint kernel on disabling lockdep, does not matter
  due to what exact reason

https://jira.sw.ru/browse/PSBM-22010

Signed-off-by: Konstantin Khorenko <khorenko at parallels.com>

Acked-by: Andrey Vagin <avagin at parallels.com>
=============================================================================

Author: Andrey Vagin
Email: avagin at openvz.org
Subject: lockdep: add tain TAINT_CRAP only once
Date: Thu, 23 Jan 2014 17:47:36 +0400

And do it after disabling lockdep. Otherwise we can be caught in a loop,
if debug_locks_off will be called from add_taint().

The 'sysctl -w kernel.tainted=0xffffffff' command does that on
my host with the 85.6 kernel.

Signed-off-by: Andrey Vagin <avagin at openvz.org>

=============================================================================

Related to https://jira.sw.ru/browse/PSBM-33650

Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>

(cherry picked from vz8 commit 95d1fd47a79db151f2791dde59a070a63e557d7d)
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 lib/debug_locks.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/debug_locks.c b/lib/debug_locks.c
index a75ee30..234b253 100644
--- a/lib/debug_locks.c
+++ b/lib/debug_locks.c
@@ -43,6 +43,13 @@ int debug_locks_off(void)
 			console_verbose();
 			return 1;
 		}
+
+		/*
+		 * We want to taint kernel so tests can easily detect a lockdep
+		 * related problem reported.
+		 */
+
+		add_taint(TAINT_CRAP, LOCKDEP_STILL_OK);
 	}
 	return 0;
 }
-- 
1.8.3.1



More information about the Devel mailing list