Thread (16 messages) 16 messages, 6 authors, 16d ago

Re: [PATCH 1/2] bug: Provide WARN_ON.*DEFERRED() macros for console deferred output

From: Peter Zijlstra <peterz@infradead.org>
Date: 2026-06-24 09:31:30
Also in: linux-arch, lkml, sched-ext

On Tue, Jun 23, 2026 at 04:26:49PM +0200, Sebastian Andrzej Siewior wrote:
+#ifndef WARN_ON_DEFERRED
+#define WARN_ON_DEFERRED(condition) ({					\
+	int __ret_warn_on = !!(condition);				\
+	if (unlikely(__ret_warn_on)) {					\
+		guard(preempt)();					\
+		printk_deferred_enter()					\
+		__WARN();						\
+		printk_deferred_exit()					\
+	}								\
+	unlikely(__ret_warn_on);					\
+})
+#endif
This will generate atrocious shite at the WARN sites.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help