diff mbox series

[topic/core-for-CI,1/2] Revert "freezer: Dump more info on whoever is trying to get frozen with locks held"

Message ID 20231024175552.15503-2-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series Drop some unnecessary patches | expand

Commit Message

Ville Syrjälä Oct. 24, 2023, 5:55 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

This was just extra debug to hunt down a regression, which got fixed.

This reverts commit d77cc11a9ab0558923d304683ad2307ec0cd5681.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 kernel/freezer.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/kernel/freezer.c b/kernel/freezer.c
index e211184c26c7..4fad0e6fca64 100644
--- a/kernel/freezer.c
+++ b/kernel/freezer.c
@@ -125,16 +125,8 @@  static int __set_task_frozen(struct task_struct *p, void *arg)
 	/*
 	 * It's dangerous to freeze with locks held; there be dragons there.
 	 */
-	if (!(state & __TASK_FREEZABLE_UNSAFE)) {
-		static bool warned = false;
-
-		if (!warned && debug_locks && p->lockdep_depth) {
-			debug_show_held_locks(p);
-			WARN(1, "%s/%d holding locks while freezing\n",
-			     p->comm, task_pid_nr(p));
-			warned = true;
-		}
-	}
+	if (!(state & __TASK_FREEZABLE_UNSAFE))
+		WARN_ON_ONCE(debug_locks && p->lockdep_depth);
 #endif
 
 	WRITE_ONCE(p->__state, TASK_FROZEN);