[Devel] [PATCH RHEL COMMIT] ve/lockdep: Taint kernel on circular locking complains

Konstantin Khorenko khorenko at virtuozzo.com
Fri Sep 24 15:48:52 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after ark-5.14
------>
commit ee6a33ff657fa8d51c60eba490ad3433f74c1320
Author: Vladimir Davydov <vdavydov.dev at gmail.com>
Date:   Fri Sep 24 15:48:52 2021 +0300

    ve/lockdep: Taint kernel on circular locking complains
    
    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 a75ee30b77cb..234b253fe501 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;
 }


More information about the Devel mailing list