| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/06/23 14:52 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only introduces and applies deferred variants of WARN_ON and WARN_ON_ONCE macros (WARN_ON_DEFERRED, WARN_ON_ONCE_DEFERRED) to avoid deadlocks during warning prints in the scheduler. This is purely a logging/decorative change that does not functionally alter the normal execution flow of the kernel.",
"WorthFuzzing": false
} |
| 1/1 | 2026/06/23 14:52 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 04f67bc0910aefb9a52a451de236cf05ef39894d\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Tue Jun 23 14:52:56 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h\nindex 09e8eccee8ed97..1e3ff00f709b89 100644\n--- a/include/asm-generic/bug.h\n+++ b/include/asm-generic/bug.h\n@@ -14,6 +14,7 @@\n #define BUGFLAG_DONE\t\t(1 \u003c\u003c 2)\n #define BUGFLAG_NO_CUT_HERE\t(1 \u003c\u003c 3)\t/* CUT_HERE already sent */\n #define BUGFLAG_ARGS\t\t(1 \u003c\u003c 4)\n+#define BUGFLAG_DEFERRED\t(1 \u003c\u003c 5)\n #define BUGFLAG_TAINT(taint)\t((taint) \u003c\u003c 8)\n #define BUG_GET_TAINT(bug)\t((bug)-\u003eflags \u003e\u003e 8)\n #endif\n@@ -115,6 +116,16 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);\n })\n #endif\n \n+#define WARN_ON_DEFERRED(condition) ({\t\t\t\t\t\\\n+\tint __ret_warn_on = !!(condition);\t\t\t\t\\\n+\tif (unlikely(__ret_warn_on)) {\t\t\t\t\t\\\n+\t\t__WARN_FLAGS(#condition,\t\t\t\t\\\n+\t\t\t BUGFLAG_DEFERRED |\t\t\t\t\\\n+\t\t\t BUGFLAG_TAINT(TAINT_WARN));\t\t\\\n+\t}\t\t\t\t\t\t\t\t\\\n+\tunlikely(__ret_warn_on);\t\t\t\t\t\\\n+})\n+\n #ifndef WARN_ON_ONCE\n #define WARN_ON_ONCE(condition) ({\t\t\t\t\t\\\n \tint __ret_warn_on = !!(condition);\t\t\t\t\\\n@@ -125,6 +136,16 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);\n \tunlikely(__ret_warn_on);\t\t\t\t\t\\\n })\n #endif\n+\n+#define WARN_ON_ONCE_DEFERRED(condition) ({\t\t\t\t\\\n+\tint __ret_warn_on = !!(condition);\t\t\t\t\\\n+\tif (unlikely(__ret_warn_on)) {\t\t\t\t\t\\\n+\t\t__WARN_FLAGS(#condition,\t\t\t\t\\\n+\t\t\t BUGFLAG_ONCE | BUGFLAG_DEFERRED |\t\t\\\n+\t\t\t BUGFLAG_TAINT(TAINT_WARN));\t\t\\\n+\t}\t\t\t\t\t\t\t\t\\\n+\tunlikely(__ret_warn_on);\t\t\t\t\t\\\n+})\n #endif /* __WARN_FLAGS */\n \n #if defined(__WARN_FLAGS) \u0026\u0026 !defined(__WARN_printf)\n@@ -159,6 +180,19 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);\n })\n #endif\n \n+#ifndef WARN_ON_DEFERRED\n+#define WARN_ON_DEFERRED(condition) ({\t\t\t\t\t\\\n+\tint __ret_warn_on = !!(condition);\t\t\t\t\\\n+\tif (unlikely(__ret_warn_on)) {\t\t\t\t\t\\\n+\t\tguard(preempt)();\t\t\t\t\t\\\n+\t\tprintk_deferred_enter()\t\t\t\t\t\\\n+\t\t__WARN();\t\t\t\t\t\t\\\n+\t\tprintk_deferred_exit()\t\t\t\t\t\\\n+\t}\t\t\t\t\t\t\t\t\\\n+\tunlikely(__ret_warn_on);\t\t\t\t\t\\\n+})\n+#endif\n+\n #ifndef WARN\n #define WARN(condition, format...) ({\t\t\t\t\t\\\n \tint __ret_warn_on = !!(condition);\t\t\t\t\\\n@@ -180,6 +214,11 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);\n \tDO_ONCE_LITE_IF(condition, WARN_ON, 1)\n #endif\n \n+#ifndef WARN_ON_ONCE_DEFERRED\n+#define WARN_ON_ONCE_DEFERRED(condition)\t\t\t\t\\\n+\tDO_ONCE_LITE_IF(condition, WARN_ON_DEFERRED, 1)\n+#endif\n+\n #ifndef WARN_ONCE\n #define WARN_ONCE(condition, format...)\t\t\t\t\\\n \tDO_ONCE_LITE_IF(condition, WARN, 1, format)\n@@ -215,7 +254,9 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);\n })\n #endif\n \n+#define WARN_ON_DEFERRED(condition) WARN_ON(condition)\n #define WARN_ON_ONCE(condition) WARN_ON(condition)\n+#define WARN_ON_ONCE_DEFERRED(condition) WARN_ON(condition)\n #define WARN_ONCE(condition, format...) WARN(condition, format)\n #define WARN_TAINT(condition, taint, format...) WARN(condition, format)\n #define WARN_TAINT_ONCE(condition, taint, format...) WARN(condition, format)\ndiff --git a/kernel/sched/core.c b/kernel/sched/core.c\nindex b8871449d3c694..0e282457abb917 100644\n--- a/kernel/sched/core.c\n+++ b/kernel/sched/core.c\n@@ -853,7 +853,7 @@ void update_rq_clock(struct rq *rq)\n \t\treturn;\n \n \tif (sched_feat(WARN_DOUBLE_CLOCK))\n-\t\tWARN_ON_ONCE(rq-\u003eclock_update_flags \u0026 RQCF_UPDATED);\n+\t\tWARN_ON_ONCE_DEFERRED(rq-\u003eclock_update_flags \u0026 RQCF_UPDATED);\n \trq-\u003eclock_update_flags |= RQCF_UPDATED;\n \n \tclock = sched_clock_cpu(cpu_of(rq));\n@@ -1807,7 +1807,7 @@ static inline void uclamp_rq_dec_id(struct rq *rq, struct task_struct *p,\n \n \tbucket = \u0026uc_rq-\u003ebucket[uc_se-\u003ebucket_id];\n \n-\tWARN_ON_ONCE(!bucket-\u003etasks);\n+\tWARN_ON_ONCE_DEFERRED(!bucket-\u003etasks);\n \tif (likely(bucket-\u003etasks))\n \t\tbucket-\u003etasks--;\n \n@@ -1827,7 +1827,7 @@ static inline void uclamp_rq_dec_id(struct rq *rq, struct task_struct *p,\n \t * Defensive programming: this should never happen. If it happens,\n \t * e.g. due to future modification, warn and fix up the expected value.\n \t */\n-\tWARN_ON_ONCE(bucket-\u003evalue \u003e rq_clamp);\n+\tWARN_ON_ONCE_DEFERRED(bucket-\u003evalue \u003e rq_clamp);\n \tif (bucket-\u003evalue \u003e= rq_clamp) {\n \t\tbkt_clamp = uclamp_rq_max_value(rq, clamp_id, uc_se-\u003evalue);\n \t\tuclamp_rq_set(rq, clamp_id, bkt_clamp);\n@@ -2210,7 +2210,7 @@ void activate_task(struct rq *rq, struct task_struct *p, int flags)\n \n void deactivate_task(struct rq *rq, struct task_struct *p, int flags)\n {\n-\tWARN_ON_ONCE(flags \u0026 DEQUEUE_SLEEP);\n+\tWARN_ON_ONCE_DEFERRED(flags \u0026 DEQUEUE_SLEEP);\n \n \tWRITE_ONCE(p-\u003eon_rq, TASK_ON_RQ_MIGRATING);\n \tASSERT_EXCLUSIVE_WRITER(p-\u003eon_rq);\n@@ -2516,7 +2516,7 @@ static struct rq *move_queued_task(struct rq *rq, struct rq_flags *rf,\n \trq = cpu_rq(new_cpu);\n \n \trq_lock(rq, rf);\n-\tWARN_ON_ONCE(task_cpu(p) != new_cpu);\n+\tWARN_ON_ONCE_DEFERRED(task_cpu(p) != new_cpu);\n \tactivate_task(rq, p, 0);\n \twakeup_preempt(rq, p, 0);\n \n@@ -2602,7 +2602,7 @@ static int migration_cpu_stop(void *data)\n \t * If we were passed a pending, then -\u003estop_pending was set, thus\n \t * p-\u003emigration_pending must have remained stable.\n \t */\n-\tWARN_ON_ONCE(pending \u0026\u0026 pending != p-\u003emigration_pending);\n+\tWARN_ON_ONCE_DEFERRED(pending \u0026\u0026 pending != p-\u003emigration_pending);\n \n \t/*\n \t * If task_rq(p) != rq, it cannot be migrated here, because we're\n@@ -2661,7 +2661,7 @@ static int migration_cpu_stop(void *data)\n \t\t * determine is_migration_disabled() and so have to chase after\n \t\t * it.\n \t\t */\n-\t\tWARN_ON_ONCE(!pending-\u003estop_pending);\n+\t\tWARN_ON_ONCE_DEFERRED(!pending-\u003estop_pending);\n \t\tpreempt_disable();\n \t\trq_unlock(rq, \u0026rf);\n \t\traw_spin_unlock_irqrestore(\u0026p-\u003epi_lock, rf.flags);\n@@ -3004,7 +3004,7 @@ static int affine_move_task(struct rq *rq, struct task_struct *p, struct rq_flag\n \t *\n \t * Either way, we really should have a @pending here.\n \t */\n-\tif (WARN_ON_ONCE(!pending)) {\n+\tif (WARN_ON_ONCE_DEFERRED(!pending)) {\n \t\ttask_rq_unlock(rq, p, rf);\n \t\treturn -EINVAL;\n \t}\n@@ -3116,9 +3116,9 @@ static int __set_cpus_allowed_ptr_locked(struct task_struct *p,\n \t\t\tgoto out;\n \t\t}\n \n-\t\tif (WARN_ON_ONCE(p == current \u0026\u0026\n-\t\t\t\t is_migration_disabled(p) \u0026\u0026\n-\t\t\t\t !cpumask_test_cpu(task_cpu(p), ctx-\u003enew_mask))) {\n+\t\tif (WARN_ON_ONCE_DEFERRED(p == current \u0026\u0026\n+\t\t\t\t\t is_migration_disabled(p) \u0026\u0026\n+\t\t\t\t\t !cpumask_test_cpu(task_cpu(p), ctx-\u003enew_mask))) {\n \t\t\tret = -EBUSY;\n \t\t\tgoto out;\n \t\t}\n@@ -3267,7 +3267,7 @@ void force_compatible_cpus_allowed_ptr(struct task_struct *p)\n \t\t\t\tcpumask_pr_args(override_mask));\n \t}\n \n-\tWARN_ON(set_cpus_allowed_ptr(p, override_mask));\n+\tWARN_ON_DEFERRED(set_cpus_allowed_ptr(p, override_mask));\n out_free_mask:\n \tcpus_read_unlock();\n \tfree_cpumask_var(new_mask);\n@@ -3293,7 +3293,7 @@ void relax_compatible_cpus_allowed_ptr(struct task_struct *p)\n \t * Cpuset masking will be done there too.\n \t */\n \tret = __sched_setaffinity(p, \u0026ac);\n-\tWARN_ON_ONCE(ret);\n+\tWARN_ON_ONCE_DEFERRED(ret);\n }\n \n #ifdef CONFIG_SMP\n@@ -3306,16 +3306,16 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)\n \t * We should never call set_task_cpu() on a blocked task,\n \t * ttwu() will sort out the placement.\n \t */\n-\tWARN_ON_ONCE(state != TASK_RUNNING \u0026\u0026 state != TASK_WAKING \u0026\u0026 !p-\u003eon_rq);\n+\tWARN_ON_ONCE_DEFERRED(state != TASK_RUNNING \u0026\u0026 state != TASK_WAKING \u0026\u0026 !p-\u003eon_rq);\n \n \t/*\n \t * Migrating fair class task must have p-\u003eon_rq = TASK_ON_RQ_MIGRATING,\n \t * because schedstat_wait_{start,end} rebase migrating task's wait_start\n \t * time relying on p-\u003eon_rq.\n \t */\n-\tWARN_ON_ONCE(state == TASK_RUNNING \u0026\u0026\n-\t\t p-\u003esched_class == \u0026fair_sched_class \u0026\u0026\n-\t\t (p-\u003eon_rq \u0026\u0026 !task_on_rq_migrating(p)));\n+\tWARN_ON_ONCE_DEFERRED(state == TASK_RUNNING \u0026\u0026\n+\t\t\t p-\u003esched_class == \u0026fair_sched_class \u0026\u0026\n+\t\t\t (p-\u003eon_rq \u0026\u0026 !task_on_rq_migrating(p)));\n \n #ifdef CONFIG_LOCKDEP\n \t/*\n@@ -3328,15 +3328,15 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)\n \t * Furthermore, all task_rq users should acquire both locks, see\n \t * task_rq_lock().\n \t */\n-\tWARN_ON_ONCE(debug_locks \u0026\u0026 !(lockdep_is_held(\u0026p-\u003epi_lock) ||\n-\t\t\t\t lockdep_is_held(__rq_lockp(task_rq(p)))));\n+\tWARN_ON_ONCE_DEFERRED(debug_locks \u0026\u0026 !(lockdep_is_held(\u0026p-\u003epi_lock) ||\n+\t\t\t\t\t lockdep_is_held(__rq_lockp(task_rq(p)))));\n #endif\n \t/*\n \t * Clearly, migrating tasks to offline CPUs is a fairly daft thing.\n \t */\n-\tWARN_ON_ONCE(!cpu_online(new_cpu));\n+\tWARN_ON_ONCE_DEFERRED(!cpu_online(new_cpu));\n \n-\tWARN_ON_ONCE(is_migration_disabled(p));\n+\tWARN_ON_ONCE_DEFERRED(is_migration_disabled(p));\n \n \ttrace_sched_migrate_task(p, new_cpu);\n \n@@ -3803,10 +3803,10 @@ void sched_ttwu_pending(void *arg)\n \tupdate_rq_clock(rq);\n \n \tllist_for_each_entry_safe(p, t, llist, wake_entry.llist) {\n-\t\tif (WARN_ON_ONCE(p-\u003eon_cpu))\n+\t\tif (WARN_ON_ONCE_DEFERRED(p-\u003eon_cpu))\n \t\t\tsmp_cond_load_acquire(\u0026p-\u003eon_cpu, !VAL);\n \n-\t\tif (WARN_ON_ONCE(task_cpu(p) != cpu_of(rq)))\n+\t\tif (WARN_ON_ONCE_DEFERRED(task_cpu(p) != cpu_of(rq)))\n \t\t\tset_task_cpu(p, cpu_of(rq));\n \n \t\tttwu_do_activate(rq, p, p-\u003esched_remote_wakeup ? WF_MIGRATED : 0, \u0026rf);\n@@ -4003,8 +4003,8 @@ bool ttwu_state_match(struct task_struct *p, unsigned int state, int *success)\n \tint match;\n \n \tif (IS_ENABLED(CONFIG_DEBUG_PREEMPT)) {\n-\t\tWARN_ON_ONCE((state \u0026 TASK_RTLOCK_WAIT) \u0026\u0026\n-\t\t\t state != TASK_RTLOCK_WAIT);\n+\t\tWARN_ON_ONCE_DEFERRED((state \u0026 TASK_RTLOCK_WAIT) \u0026\u0026\n+\t\t\t\t state != TASK_RTLOCK_WAIT);\n \t}\n \n \t*success = !!(match = __task_state_match(p, state));\n@@ -5745,7 +5745,7 @@ static void sched_tick_remote(struct work_struct *work)\n \t\t\t * we are always sure that there is no proxy (only a\n \t\t\t * single task is running).\n \t\t\t */\n-\t\t\tWARN_ON_ONCE(rq-\u003ecurr != rq-\u003edonor);\n+\t\t\tWARN_ON_ONCE_DEFERRED(rq-\u003ecurr != rq-\u003edonor);\n \t\t\tupdate_rq_clock(rq);\n \n \t\t\tif (!is_idle_task(curr)) {\n@@ -5754,7 +5754,7 @@ static void sched_tick_remote(struct work_struct *work)\n \t\t\t\t * reasonable amount of time.\n \t\t\t\t */\n \t\t\t\tu64 delta = rq_clock_task(rq) - curr-\u003ese.exec_start;\n-\t\t\t\tWARN_ON_ONCE(delta \u003e (u64)NSEC_PER_SEC * 30);\n+\t\t\t\tWARN_ON_ONCE_DEFERRED(delta \u003e (u64)NSEC_PER_SEC * 30);\n \t\t\t}\n \t\t\tcurr-\u003esched_class-\u003etask_tick(rq, curr, 0);\n \n@@ -5769,7 +5769,7 @@ static void sched_tick_remote(struct work_struct *work)\n \t * first update state to reflect hotplug activity if required.\n \t */\n \tos = atomic_fetch_add_unless(\u0026twork-\u003estate, -1, TICK_SCHED_REMOTE_RUNNING);\n-\tWARN_ON_ONCE(os == TICK_SCHED_REMOTE_OFFLINE);\n+\tWARN_ON_ONCE_DEFERRED(os == TICK_SCHED_REMOTE_OFFLINE);\n \tif (os == TICK_SCHED_REMOTE_RUNNING)\n \t\tqueue_delayed_work(system_dfl_wq, dwork, HZ);\n }\n@@ -6196,7 +6196,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)\n \t\t\t * For robustness, update the min_vruntime_fi for\n \t\t\t * unconstrained picks as well.\n \t\t\t */\n-\t\t\tWARN_ON_ONCE(fi_before);\n+\t\t\tWARN_ON_ONCE_DEFERRED(fi_before);\n \t\t\ttask_vruntime_update(rq, next, false);\n \t\t\tgoto out_set_next;\n \t\t}\n@@ -6274,7 +6274,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)\n \trq-\u003ecore_sched_seq = rq-\u003ecore-\u003ecore_pick_seq;\n \n \t/* Something should have been selected for current CPU */\n-\tWARN_ON_ONCE(!next);\n+\tWARN_ON_ONCE_DEFERRED(!next);\n \n \t/*\n \t * Reschedule siblings\n@@ -6317,7 +6317,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)\n \t\t}\n \n \t\t/* Did we break L1TF mitigation requirements? */\n-\t\tWARN_ON_ONCE(!cookie_match(next, rq_i-\u003ecore_pick));\n+\t\tWARN_ON_ONCE_DEFERRED(!cookie_match(next, rq_i-\u003ecore_pick));\n \n \t\tif (rq_i-\u003ecurr == rq_i-\u003ecore_pick) {\n \t\t\trq_i-\u003ecore_pick = NULL;\n@@ -6717,7 +6717,7 @@ static void proxy_migrate_task(struct rq *rq, struct rq_flags *rf,\n \tstruct rq *target_rq = cpu_rq(target_cpu);\n \n \tlockdep_assert_rq_held(rq);\n-\tWARN_ON(p == rq-\u003ecurr);\n+\tWARN_ON_DEFERRED(p == rq-\u003ecurr);\n \t/*\n \t * Since we are migrating a blocked donor, it could be rq-\u003edonor,\n \t * and we want to make sure there aren't any references from this\n@@ -6749,7 +6749,7 @@ static void proxy_force_return(struct rq *rq, struct rq_flags *rf,\n \tint cpu, wake_flag = WF_TTWU;\n \n \tlockdep_assert_rq_held(rq);\n-\tWARN_ON(p == rq-\u003ecurr);\n+\tWARN_ON_DEFERRED(p == rq-\u003ecurr);\n \n \tif (p == rq-\u003edonor)\n \t\tproxy_resched_idle(rq);\n@@ -6951,7 +6951,7 @@ find_proxy_task(struct rq *rq, struct task_struct *donor, struct rq_flags *rf)\n \t\t * guarantee its existence, as per ttwu_remote().\n \t\t */\n \t}\n-\tWARN_ON_ONCE(owner \u0026\u0026 !owner-\u003eon_rq);\n+\tWARN_ON_ONCE_DEFERRED(owner \u0026\u0026 !owner-\u003eon_rq);\n \treturn owner;\n \n deactivate:\n@@ -7631,8 +7631,8 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)\n \t * real need to boost.\n \t */\n \tif (unlikely(p == rq-\u003eidle)) {\n-\t\tWARN_ON(p != rq-\u003ecurr);\n-\t\tWARN_ON(p-\u003epi_blocked_on);\n+\t\tWARN_ON_DEFERRED(p != rq-\u003ecurr);\n+\t\tWARN_ON_DEFERRED(p-\u003epi_blocked_on);\n \t\tgoto out_unlock;\n \t}\n \n@@ -8463,7 +8463,7 @@ static void balance_push_set(int cpu, bool on)\n \n \trq_lock_irqsave(rq, \u0026rf);\n \tif (on) {\n-\t\tWARN_ON_ONCE(rq-\u003ebalance_callback);\n+\t\tWARN_ON_ONCE_DEFERRED(rq-\u003ebalance_callback);\n \t\trq-\u003ebalance_callback = \u0026balance_push_callback;\n \t} else if (rq-\u003ebalance_callback == \u0026balance_push_callback) {\n \t\trq-\u003ebalance_callback = NULL;\n@@ -11150,7 +11150,7 @@ struct sched_change_ctx *sched_change_begin(struct task_struct *p, unsigned int\n \t * Must exclusively use matched flags since this is both dequeue and\n \t * enqueue.\n \t */\n-\tWARN_ON_ONCE(flags \u0026 0xFFFF0000);\n+\tWARN_ON_ONCE_DEFERRED(flags \u0026 0xFFFF0000);\n \n \tlockdep_assert_rq_held(rq);\n \n@@ -11198,7 +11198,7 @@ void sched_change_end(struct sched_change_ctx *ctx)\n \t/*\n \t * Changing class without *QUEUE_CLASS is bad.\n \t */\n-\tWARN_ON_ONCE(p-\u003esched_class != ctx-\u003eclass \u0026\u0026 !(ctx-\u003eflags \u0026 ENQUEUE_CLASS));\n+\tWARN_ON_ONCE_DEFERRED(p-\u003esched_class != ctx-\u003eclass \u0026\u0026 !(ctx-\u003eflags \u0026 ENQUEUE_CLASS));\n \n \tif ((ctx-\u003eflags \u0026 ENQUEUE_CLASS) \u0026\u0026 p-\u003esched_class-\u003eswitching_to)\n \t\tp-\u003esched_class-\u003eswitching_to(rq, p);\ndiff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c\nindex 73b6b24269119b..ec88ed7d8ee877 100644\n--- a/kernel/sched/core_sched.c\n+++ b/kernel/sched/core_sched.c\n@@ -67,7 +67,7 @@ static unsigned long sched_core_update_cookie(struct task_struct *p,\n \t * a cookie until after we've removed it, we must have core scheduling\n \t * enabled here.\n \t */\n-\tWARN_ON_ONCE((p-\u003ecore_cookie || cookie) \u0026\u0026 !sched_core_enabled(rq));\n+\tWARN_ON_ONCE_DEFERRED((p-\u003ecore_cookie || cookie) \u0026\u0026 !sched_core_enabled(rq));\n \n \tif (sched_core_enqueued(p))\n \t\tsched_core_dequeue(rq, p, DEQUEUE_SAVE);\n@@ -249,7 +249,7 @@ void __sched_core_account_forceidle(struct rq *rq)\n \n \tlockdep_assert_rq_held(rq);\n \n-\tWARN_ON_ONCE(!rq-\u003ecore-\u003ecore_forceidle_count);\n+\tWARN_ON_ONCE_DEFERRED(!rq-\u003ecore-\u003ecore_forceidle_count);\n \n \tif (rq-\u003ecore-\u003ecore_forceidle_start == 0)\n \t\treturn;\n@@ -260,7 +260,7 @@ void __sched_core_account_forceidle(struct rq *rq)\n \n \trq-\u003ecore-\u003ecore_forceidle_start = now;\n \n-\tif (WARN_ON_ONCE(!rq-\u003ecore-\u003ecore_forceidle_occupation)) {\n+\tif (WARN_ON_ONCE_DEFERRED(!rq-\u003ecore-\u003ecore_forceidle_occupation)) {\n \t\t/* can't be forced idle without a running task */\n \t} else if (rq-\u003ecore-\u003ecore_forceidle_count \u003e 1 ||\n \t\t rq-\u003ecore-\u003ecore_forceidle_occupation \u003e 1) {\ndiff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c\nindex 0a2b7e30fd10c1..e305a8e993e27c 100644\n--- a/kernel/sched/cpudeadline.c\n+++ b/kernel/sched/cpudeadline.c\n@@ -149,7 +149,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,\n \t} else {\n \t\tint best_cpu = cpudl_maximum(cp);\n \n-\t\tWARN_ON(best_cpu != -1 \u0026\u0026 !cpu_present(best_cpu));\n+\t\tWARN_ON_DEFERRED(best_cpu != -1 \u0026\u0026 !cpu_present(best_cpu));\n \n \t\tif (cpumask_test_cpu(best_cpu, \u0026p-\u003ecpus_mask) \u0026\u0026\n \t\t dl_time_before(dl_se-\u003edeadline, cp-\u003eelements[0].dl)) {\n@@ -177,7 +177,7 @@ void cpudl_clear(struct cpudl *cp, int cpu, bool online)\n \tint old_idx, new_cpu;\n \tunsigned long flags;\n \n-\tWARN_ON(!cpu_present(cpu));\n+\tWARN_ON_DEFERRED(!cpu_present(cpu));\n \n \traw_spin_lock_irqsave(\u0026cp-\u003elock, flags);\n \n@@ -220,7 +220,7 @@ void cpudl_set(struct cpudl *cp, int cpu, u64 dl)\n \tint old_idx;\n \tunsigned long flags;\n \n-\tWARN_ON(!cpu_present(cpu));\n+\tWARN_ON_DEFERRED(!cpu_present(cpu));\n \n \traw_spin_lock_irqsave(\u0026cp-\u003elock, flags);\n \ndiff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c\nindex 7db4c87df83b0a..863ac7509192f7 100644\n--- a/kernel/sched/deadline.c\n+++ b/kernel/sched/deadline.c\n@@ -217,8 +217,8 @@ void __add_running_bw(u64 dl_bw, struct dl_rq *dl_rq)\n \n \tlockdep_assert_rq_held(rq_of_dl_rq(dl_rq));\n \tdl_rq-\u003erunning_bw += dl_bw;\n-\tWARN_ON_ONCE(dl_rq-\u003erunning_bw \u003c old); /* overflow */\n-\tWARN_ON_ONCE(dl_rq-\u003erunning_bw \u003e dl_rq-\u003ethis_bw);\n+\tWARN_ON_ONCE_DEFERRED(dl_rq-\u003erunning_bw \u003c old); /* overflow */\n+\tWARN_ON_ONCE_DEFERRED(dl_rq-\u003erunning_bw \u003e dl_rq-\u003ethis_bw);\n \t/* kick cpufreq (see the comment in kernel/sched/sched.h). */\n \tcpufreq_update_util(rq_of_dl_rq(dl_rq), 0);\n }\n@@ -230,7 +230,7 @@ void __sub_running_bw(u64 dl_bw, struct dl_rq *dl_rq)\n \n \tlockdep_assert_rq_held(rq_of_dl_rq(dl_rq));\n \tdl_rq-\u003erunning_bw -= dl_bw;\n-\tWARN_ON_ONCE(dl_rq-\u003erunning_bw \u003e old); /* underflow */\n+\tWARN_ON_ONCE_DEFERRED(dl_rq-\u003erunning_bw \u003e old); /* underflow */\n \tif (dl_rq-\u003erunning_bw \u003e old)\n \t\tdl_rq-\u003erunning_bw = 0;\n \t/* kick cpufreq (see the comment in kernel/sched/sched.h). */\n@@ -244,7 +244,7 @@ void __add_rq_bw(u64 dl_bw, struct dl_rq *dl_rq)\n \n \tlockdep_assert_rq_held(rq_of_dl_rq(dl_rq));\n \tdl_rq-\u003ethis_bw += dl_bw;\n-\tWARN_ON_ONCE(dl_rq-\u003ethis_bw \u003c old); /* overflow */\n+\tWARN_ON_ONCE_DEFERRED(dl_rq-\u003ethis_bw \u003c old); /* overflow */\n }\n \n static inline\n@@ -254,10 +254,10 @@ void __sub_rq_bw(u64 dl_bw, struct dl_rq *dl_rq)\n \n \tlockdep_assert_rq_held(rq_of_dl_rq(dl_rq));\n \tdl_rq-\u003ethis_bw -= dl_bw;\n-\tWARN_ON_ONCE(dl_rq-\u003ethis_bw \u003e old); /* underflow */\n+\tWARN_ON_ONCE_DEFERRED(dl_rq-\u003ethis_bw \u003e old); /* underflow */\n \tif (dl_rq-\u003ethis_bw \u003e old)\n \t\tdl_rq-\u003ethis_bw = 0;\n-\tWARN_ON_ONCE(dl_rq-\u003erunning_bw \u003e dl_rq-\u003ethis_bw);\n+\tWARN_ON_ONCE_DEFERRED(dl_rq-\u003erunning_bw \u003e dl_rq-\u003ethis_bw);\n }\n \n static inline\n@@ -335,7 +335,7 @@ void cancel_inactive_timer(struct sched_dl_entity *dl_se)\n \n static void dl_change_utilization(struct task_struct *p, u64 new_bw)\n {\n-\tWARN_ON_ONCE(p-\u003edl.flags \u0026 SCHED_FLAG_SUGOV);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003edl.flags \u0026 SCHED_FLAG_SUGOV);\n \n \tif (task_on_rq_queued(p))\n \t\treturn;\n@@ -416,7 +416,7 @@ static void task_non_contending(struct sched_dl_entity *dl_se, bool dl_task)\n \tif (dl_entity_is_special(dl_se))\n \t\treturn;\n \n-\tWARN_ON(dl_se-\u003edl_non_contending);\n+\tWARN_ON_DEFERRED(dl_se-\u003edl_non_contending);\n \n \tzerolag_time = dl_se-\u003edeadline -\n \t\t div64_long((dl_se-\u003eruntime * dl_se-\u003edl_period),\n@@ -582,7 +582,7 @@ static void enqueue_pushable_dl_task(struct rq *rq, struct task_struct *p)\n {\n \tstruct rb_node *leftmost;\n \n-\tWARN_ON_ONCE(!RB_EMPTY_NODE(\u0026p-\u003epushable_dl_tasks));\n+\tWARN_ON_ONCE_DEFERRED(!RB_EMPTY_NODE(\u0026p-\u003epushable_dl_tasks));\n \n \tleftmost = rb_add_cached(\u0026p-\u003epushable_dl_tasks,\n \t\t\t\t \u0026rq-\u003edl.pushable_dl_tasks_root,\n@@ -664,7 +664,7 @@ static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p\n \t\t\t * Failed to find any suitable CPU.\n \t\t\t * The task will never come back!\n \t\t\t */\n-\t\t\tWARN_ON_ONCE(dl_bandwidth_enabled());\n+\t\t\tWARN_ON_ONCE_DEFERRED(dl_bandwidth_enabled());\n \n \t\t\t/*\n \t\t\t * If admission control is disabled we\n@@ -756,8 +756,8 @@ static inline void setup_new_dl_entity(struct sched_dl_entity *dl_se)\n \tstruct dl_rq *dl_rq = dl_rq_of_se(dl_se);\n \tstruct rq *rq = rq_of_dl_rq(dl_rq);\n \n-\tWARN_ON(is_dl_boosted(dl_se));\n-\tWARN_ON(dl_time_before(rq_clock(rq), dl_se-\u003edeadline));\n+\tWARN_ON_DEFERRED(is_dl_boosted(dl_se));\n+\tWARN_ON_DEFERRED(dl_time_before(rq_clock(rq), dl_se-\u003edeadline));\n \n \t/*\n \t * We are racing with the deadline timer. So, do nothing because\n@@ -801,7 +801,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se)\n \tstruct dl_rq *dl_rq = dl_rq_of_se(dl_se);\n \tstruct rq *rq = rq_of_dl_rq(dl_rq);\n \n-\tWARN_ON_ONCE(pi_of(dl_se)-\u003edl_runtime \u003c= 0);\n+\tWARN_ON_ONCE_DEFERRED(pi_of(dl_se)-\u003edl_runtime \u003c= 0);\n \n \t/*\n \t * This could be the case for a !-dl task that is boosted.\n@@ -975,7 +975,7 @@ update_dl_revised_wakeup(struct sched_dl_entity *dl_se, struct rq *rq)\n \t *\n \t * See update_dl_entity() comments for further details.\n \t */\n-\tWARN_ON(dl_time_before(dl_se-\u003edeadline, rq_clock(rq)));\n+\tWARN_ON_DEFERRED(dl_time_before(dl_se-\u003edeadline, rq_clock(rq)));\n \n \tdl_se-\u003eruntime = (dl_se-\u003edl_density * laxity) \u003e\u003e BW_SHIFT;\n }\n@@ -1080,7 +1080,7 @@ static int start_dl_timer(struct sched_dl_entity *dl_se)\n \t * (current u \u003e U).\n \t */\n \tif (dl_se-\u003edl_defer_armed) {\n-\t\tWARN_ON_ONCE(!dl_se-\u003edl_throttled);\n+\t\tWARN_ON_ONCE_DEFERRED(!dl_se-\u003edl_throttled);\n \t\tact = ns_to_ktime(dl_se-\u003edeadline - dl_se-\u003eruntime);\n \t} else {\n \t\t/* act = deadline - rel-deadline + period */\n@@ -1451,7 +1451,7 @@ static void update_curr_dl_se(struct rq *rq, struct sched_dl_entity *dl_se, s64\n \t\t/*\n \t\t * Non-servers would never get time accounted while throttled.\n \t\t */\n-\t\tWARN_ON_ONCE(!dl_server(dl_se));\n+\t\tWARN_ON_ONCE_DEFERRED(!dl_server(dl_se));\n \n \t\t/*\n \t\t * While the server is marked idle, do not push out the\n@@ -1492,7 +1492,7 @@ static void update_curr_dl_se(struct rq *rq, struct sched_dl_entity *dl_se, s64\n \t\t * and queue right away. Otherwise nothing might queue it. That's similar\n \t\t * to what enqueue_dl_entity() does on start_dl_timer==0. For now, just warn.\n \t\t */\n-\t\tWARN_ON_ONCE(!start_dl_timer(dl_se));\n+\t\tWARN_ON_ONCE_DEFERRED(!start_dl_timer(dl_se));\n \n \t\treturn;\n \t}\n@@ -1801,7 +1801,7 @@ void dl_server_start(struct sched_dl_entity *dl_se)\n \t */\n \trq-\u003edonor-\u003esched_class-\u003eupdate_curr(rq);\n \n-\tif (WARN_ON_ONCE(!cpu_online(cpu_of(rq))))\n+\tif (WARN_ON_ONCE_DEFERRED(!cpu_online(cpu_of(rq))))\n \t\treturn;\n \n \ttrace_sched_dl_server_start_tp(dl_se, cpu_of(rq), dl_get_type(dl_se, rq));\n@@ -2073,7 +2073,7 @@ void inc_dl_tasks(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)\n static inline\n void dec_dl_tasks(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)\n {\n-\tWARN_ON(!dl_rq-\u003edl_nr_running);\n+\tWARN_ON_DEFERRED(!dl_rq-\u003edl_nr_running);\n \tdl_rq-\u003edl_nr_running--;\n \n \tif (!dl_server(dl_se))\n@@ -2165,7 +2165,7 @@ static void __enqueue_dl_entity(struct sched_dl_entity *dl_se)\n {\n \tstruct dl_rq *dl_rq = dl_rq_of_se(dl_se);\n \n-\tWARN_ON_ONCE(!RB_EMPTY_NODE(\u0026dl_se-\u003erb_node));\n+\tWARN_ON_ONCE_DEFERRED(!RB_EMPTY_NODE(\u0026dl_se-\u003erb_node));\n \n \trb_add_cached(\u0026dl_se-\u003erb_node, \u0026dl_rq-\u003eroot, __dl_less);\n \n@@ -2189,7 +2189,7 @@ static void __dequeue_dl_entity(struct sched_dl_entity *dl_se)\n static void\n enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags)\n {\n-\tWARN_ON_ONCE(on_dl_rq(dl_se));\n+\tWARN_ON_ONCE_DEFERRED(on_dl_rq(dl_se));\n \n \tupdate_stats_enqueue_dl(dl_rq_of_se(dl_se), dl_se, flags);\n \n@@ -2611,7 +2611,7 @@ static struct task_struct *__pick_task_dl(struct rq *rq, struct rq_flags *rf)\n \t\treturn NULL;\n \n \tdl_se = pick_next_dl_entity(dl_rq);\n-\tWARN_ON_ONCE(!dl_se);\n+\tWARN_ON_ONCE_DEFERRED(!dl_se);\n \n \tif (dl_server(dl_se)) {\n \t\tp = dl_se-\u003eserver_pick_task(dl_se, rf);\n@@ -2823,12 +2823,12 @@ static struct task_struct *pick_next_pushable_dl_task(struct rq *rq)\n \tif (!p)\n \t\treturn NULL;\n \n-\tWARN_ON_ONCE(rq-\u003ecpu != task_cpu(p));\n-\tWARN_ON_ONCE(task_current(rq, p));\n-\tWARN_ON_ONCE(p-\u003enr_cpus_allowed \u003c= 1);\n+\tWARN_ON_ONCE_DEFERRED(rq-\u003ecpu != task_cpu(p));\n+\tWARN_ON_ONCE_DEFERRED(task_current(rq, p));\n+\tWARN_ON_ONCE_DEFERRED(p-\u003enr_cpus_allowed \u003c= 1);\n \n-\tWARN_ON_ONCE(!task_on_rq_queued(p));\n-\tWARN_ON_ONCE(!dl_task(p));\n+\tWARN_ON_ONCE_DEFERRED(!task_on_rq_queued(p));\n+\tWARN_ON_ONCE_DEFERRED(!dl_task(p));\n \n \treturn p;\n }\n@@ -2944,7 +2944,7 @@ static int push_dl_task(struct rq *rq)\n \tif (is_migration_disabled(next_task))\n \t\treturn 0;\n \n-\tif (WARN_ON(next_task == rq-\u003ecurr))\n+\tif (WARN_ON_DEFERRED(next_task == rq-\u003ecurr))\n \t\treturn 0;\n \n \t/* We might release rq lock */\n@@ -3050,8 +3050,8 @@ static void pull_dl_task(struct rq *this_rq)\n \t\t */\n \t\tif (p \u0026\u0026 dl_time_before(p-\u003edl.deadline, dmin) \u0026\u0026\n \t\t dl_task_is_earliest_deadline(p, this_rq)) {\n-\t\t\tWARN_ON(p == src_rq-\u003ecurr);\n-\t\t\tWARN_ON(!task_on_rq_queued(p));\n+\t\t\tWARN_ON_DEFERRED(p == src_rq-\u003ecurr);\n+\t\t\tWARN_ON_DEFERRED(!task_on_rq_queued(p));\n \n \t\t\t/*\n \t\t\t * Then we pull iff p has actually an earlier\n@@ -3109,7 +3109,7 @@ static void set_cpus_allowed_dl(struct task_struct *p,\n {\n \tstruct rq *rq;\n \n-\tWARN_ON_ONCE(!dl_task(p));\n+\tWARN_ON_ONCE_DEFERRED(!dl_task(p));\n \n \trq = task_rq(p);\n \t/*\ndiff --git a/kernel/sched/ext.c b/kernel/sched/ext.c\nindex 5d2d19473a82e8..47d3a4c16455ac 100644\n--- a/kernel/sched/ext.c\n+++ b/kernel/sched/ext.c\n@@ -512,12 +512,12 @@ do {\t\t\t\t\t\t\t\t\t\t\\\n * So if kf_tasks[] is set, @p's scheduler-protected fields are stable.\n *\n * kf_tasks[] can not stack, so task-based SCX ops must not nest. The\n- * WARN_ON_ONCE() in each macro catches a re-entry of any of the three variants\n- * while a previous one is still in progress.\n+ * WARN_ON_ONCE_DEFERRED() in each macro catches a re-entry of any of the three\n+ * variants while a previous one is still in progress.\n */\n #define SCX_CALL_OP_TASK(sch, op, locked_rq, task, args...)\t\t\t\\\n do {\t\t\t\t\t\t\t\t\t\t\\\n-\tWARN_ON_ONCE(current-\u003escx.kf_tasks[0]);\t\t\t\t\t\\\n+\tWARN_ON_ONCE_DEFERRED(current-\u003escx.kf_tasks[0]);\t\t\t\\\n \tcurrent-\u003escx.kf_tasks[0] = task;\t\t\t\t\t\\\n \tSCX_CALL_OP((sch), op, locked_rq, task, ##args);\t\t\t\\\n \tcurrent-\u003escx.kf_tasks[0] = NULL;\t\t\t\t\t\\\n@@ -526,7 +526,7 @@ do {\t\t\t\t\t\t\t\t\t\t\\\n #define SCX_CALL_OP_TASK_RET(sch, op, locked_rq, task, args...)\t\t\t\\\n ({\t\t\t\t\t\t\t\t\t\t\\\n \t__typeof__((sch)-\u003eops.op(task, ##args)) __ret;\t\t\t\t\\\n-\tWARN_ON_ONCE(current-\u003escx.kf_tasks[0]);\t\t\t\t\t\\\n+\tWARN_ON_ONCE_DEFERRED(current-\u003escx.kf_tasks[0]);\t\t\t\\\n \tcurrent-\u003escx.kf_tasks[0] = task;\t\t\t\t\t\\\n \t__ret = SCX_CALL_OP_RET((sch), op, locked_rq, task, ##args);\t\t\\\n \tcurrent-\u003escx.kf_tasks[0] = NULL;\t\t\t\t\t\\\n@@ -536,7 +536,7 @@ do {\t\t\t\t\t\t\t\t\t\t\\\n #define SCX_CALL_OP_2TASKS_RET(sch, op, locked_rq, task0, task1, args...)\t\\\n ({\t\t\t\t\t\t\t\t\t\t\\\n \t__typeof__((sch)-\u003eops.op(task0, task1, ##args)) __ret;\t\t\t\\\n-\tWARN_ON_ONCE(current-\u003escx.kf_tasks[0]);\t\t\t\t\t\\\n+\tWARN_ON_ONCE_DEFERRED(current-\u003escx.kf_tasks[0]);\t\t\t\\\n \tcurrent-\u003escx.kf_tasks[0] = task0;\t\t\t\t\t\\\n \tcurrent-\u003escx.kf_tasks[1] = task1;\t\t\t\t\t\\\n \t__ret = SCX_CALL_OP_RET((sch), op, locked_rq, task0, task1, ##args);\t\\\n@@ -687,7 +687,7 @@ static bool nldsq_cursor_lost_task(struct scx_dsq_list_node *cursor,\n \t\treturn true;\n \n \t/* if @p has stayed on @dsq, its rq couldn't have changed */\n-\tif (WARN_ON_ONCE(rq != task_rq(p)))\n+\tif (WARN_ON_ONCE_DEFERRED(rq != task_rq(p)))\n \t\treturn true;\n \n \treturn false;\n@@ -1282,7 +1282,7 @@ static void schedule_reenq_local(struct rq *rq, u64 reenq_flags)\n {\n \tstruct scx_sched *root = rcu_dereference_sched(scx_root);\n \n-\tif (WARN_ON_ONCE(!root))\n+\tif (WARN_ON_ONCE_DEFERRED(!root))\n \t\treturn;\n \n \tschedule_dsq_reenq(root, \u0026rq-\u003escx.local_dsq, reenq_flags, rq);\n@@ -1379,7 +1379,7 @@ static void dsq_inc_nr(struct scx_dispatch_q *dsq, struct task_struct *p, u64 en\n \t */\n \tif (enq_flags \u0026 SCX_ENQ_IMMED) {\n \t\tif (unlikely(dsq-\u003eid != SCX_DSQ_LOCAL)) {\n-\t\t\tWARN_ON_ONCE(!(enq_flags \u0026 SCX_ENQ_GDSQ_FALLBACK));\n+\t\t\tWARN_ON_ONCE_DEFERRED(!(enq_flags \u0026 SCX_ENQ_GDSQ_FALLBACK));\n \t\t\treturn;\n \t\t}\n \t\tp-\u003escx.flags |= SCX_TASK_IMMED;\n@@ -1388,7 +1388,7 @@ static void dsq_inc_nr(struct scx_dispatch_q *dsq, struct task_struct *p, u64 en\n \tif (p-\u003escx.flags \u0026 SCX_TASK_IMMED) {\n \t\tstruct rq *rq = container_of(dsq, struct rq, scx.local_dsq);\n \n-\t\tif (WARN_ON_ONCE(dsq-\u003eid != SCX_DSQ_LOCAL))\n+\t\tif (WARN_ON_ONCE_DEFERRED(dsq-\u003eid != SCX_DSQ_LOCAL))\n \t\t\treturn;\n \n \t\trq-\u003escx.nr_immed++;\n@@ -1410,8 +1410,8 @@ static void dsq_dec_nr(struct scx_dispatch_q *dsq, struct task_struct *p)\n \tif (p-\u003escx.flags \u0026 SCX_TASK_IMMED) {\n \t\tstruct rq *rq = container_of(dsq, struct rq, scx.local_dsq);\n \n-\t\tif (WARN_ON_ONCE(dsq-\u003eid != SCX_DSQ_LOCAL) ||\n-\t\t WARN_ON_ONCE(rq-\u003escx.nr_immed \u003c= 0))\n+\t\tif (WARN_ON_ONCE_DEFERRED(dsq-\u003eid != SCX_DSQ_LOCAL) ||\n+\t\t WARN_ON_ONCE_DEFERRED(rq-\u003escx.nr_immed \u003c= 0))\n \t\t\treturn;\n \n \t\trq-\u003escx.nr_immed--;\n@@ -1521,9 +1521,9 @@ static void dispatch_enqueue(struct scx_sched *sch, struct rq *rq,\n {\n \tbool is_local = dsq-\u003eid == SCX_DSQ_LOCAL;\n \n-\tWARN_ON_ONCE(p-\u003escx.dsq || !list_empty(\u0026p-\u003escx.dsq_list.node));\n-\tWARN_ON_ONCE((p-\u003escx.dsq_flags \u0026 SCX_TASK_DSQ_ON_PRIQ) ||\n-\t\t !RB_EMPTY_NODE(\u0026p-\u003escx.dsq_priq));\n+\tWARN_ON_ONCE_DEFERRED(p-\u003escx.dsq || !list_empty(\u0026p-\u003escx.dsq_list.node));\n+\tWARN_ON_ONCE_DEFERRED((p-\u003escx.dsq_flags \u0026 SCX_TASK_DSQ_ON_PRIQ) ||\n+\t\t\t !RB_EMPTY_NODE(\u0026p-\u003escx.dsq_priq));\n \n \tif (!is_local) {\n \t\traw_spin_lock_nested(\u0026dsq-\u003elock,\n@@ -1646,7 +1646,7 @@ static void dispatch_enqueue(struct scx_sched *sch, struct rq *rq,\n static void task_unlink_from_dsq(struct task_struct *p,\n \t\t\t\t struct scx_dispatch_q *dsq)\n {\n-\tWARN_ON_ONCE(list_empty(\u0026p-\u003escx.dsq_list.node));\n+\tWARN_ON_ONCE_DEFERRED(list_empty(\u0026p-\u003escx.dsq_list.node));\n \n \tif (p-\u003escx.dsq_flags \u0026 SCX_TASK_DSQ_ON_PRIQ) {\n \t\trb_erase(\u0026p-\u003escx.dsq_priq, \u0026dsq-\u003epriq);\n@@ -1709,7 +1709,7 @@ static void dispatch_dequeue(struct rq *rq, struct task_struct *p)\n \t\t * holding_cpu which tells dispatch_to_local_dsq() that it lost\n \t\t * the race.\n \t\t */\n-\t\tWARN_ON_ONCE(!list_empty(\u0026p-\u003escx.dsq_list.node));\n+\t\tWARN_ON_ONCE_DEFERRED(!list_empty(\u0026p-\u003escx.dsq_list.node));\n \t\tp-\u003escx.holding_cpu = -1;\n \t}\n \tp-\u003escx.dsq = NULL;\n@@ -1787,8 +1787,8 @@ static void mark_direct_dispatch(struct scx_sched *sch,\n \t\treturn;\n \t}\n \n-\tWARN_ON_ONCE(p-\u003escx.ddsp_dsq_id != SCX_DSQ_INVALID);\n-\tWARN_ON_ONCE(p-\u003escx.ddsp_enq_flags);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003escx.ddsp_dsq_id != SCX_DSQ_INVALID);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003escx.ddsp_enq_flags);\n \n \tp-\u003escx.ddsp_dsq_id = dsq_id;\n \tp-\u003escx.ddsp_enq_flags = enq_flags;\n@@ -1855,7 +1855,7 @@ static void direct_dispatch(struct scx_sched *sch, struct task_struct *p,\n \t\t\tbreak;\n \t\t}\n \n-\t\tWARN_ON_ONCE(p-\u003escx.dsq || !list_empty(\u0026p-\u003escx.dsq_list.node));\n+\t\tWARN_ON_ONCE_DEFERRED(p-\u003escx.dsq || !list_empty(\u0026p-\u003escx.dsq_list.node));\n \t\tlist_add_tail(\u0026p-\u003escx.dsq_list.node,\n \t\t\t \u0026rq-\u003escx.ddsp_deferred_locals);\n \t\tschedule_deferred_locked(rq);\n@@ -1888,7 +1888,7 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,\n \tstruct scx_dispatch_q *dsq;\n \tunsigned long qseq;\n \n-\tWARN_ON_ONCE(!(p-\u003escx.flags \u0026 SCX_TASK_QUEUED));\n+\tWARN_ON_ONCE_DEFERRED(!(p-\u003escx.flags \u0026 SCX_TASK_QUEUED));\n \n \t/* internal movements - rq migration / RESTORE */\n \tif (sticky_cpu == cpu_of(rq))\n@@ -1938,11 +1938,11 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,\n \t/* DSQ bypass didn't trigger, enqueue on the BPF scheduler */\n \tqseq = rq-\u003escx.ops_qseq++ \u003c\u003c SCX_OPSS_QSEQ_SHIFT;\n \n-\tWARN_ON_ONCE(atomic_long_read(\u0026p-\u003escx.ops_state) != SCX_OPSS_NONE);\n+\tWARN_ON_ONCE_DEFERRED(atomic_long_read(\u0026p-\u003escx.ops_state) != SCX_OPSS_NONE);\n \tatomic_long_set(\u0026p-\u003escx.ops_state, SCX_OPSS_QUEUEING | qseq);\n \n \tddsp_taskp = this_cpu_ptr(\u0026direct_dispatch_task);\n-\tWARN_ON_ONCE(*ddsp_taskp);\n+\tWARN_ON_ONCE_DEFERRED(*ddsp_taskp);\n \t*ddsp_taskp = p;\n \n \tSCX_CALL_OP_TASK(sch, enqueue, rq, p, enq_flags);\n@@ -2039,7 +2039,7 @@ static void enqueue_task_scx(struct rq *rq, struct task_struct *p, int core_enq_\n \t\tsticky_cpu = cpu_of(rq);\n \n \tif (p-\u003escx.flags \u0026 SCX_TASK_QUEUED) {\n-\t\tWARN_ON_ONCE(!task_runnable(p));\n+\t\tWARN_ON_ONCE_DEFERRED(!task_runnable(p));\n \t\tgoto out;\n \t}\n \n@@ -2159,7 +2159,7 @@ static bool dequeue_task_scx(struct rq *rq, struct task_struct *p, int core_deq_\n \t\tdeq_flags |= SCX_DEQ_SCHED_CHANGE;\n \n \tif (!(p-\u003escx.flags \u0026 SCX_TASK_QUEUED)) {\n-\t\tWARN_ON_ONCE(task_runnable(p));\n+\t\tWARN_ON_ONCE_DEFERRED(task_runnable(p));\n \t\treturn true;\n \t}\n \n@@ -2256,7 +2256,7 @@ static void move_local_task_to_local_dsq(struct scx_sched *sch,\n \tlockdep_assert_held(\u0026src_dsq-\u003elock);\n \tlockdep_assert_rq_held(dst_rq);\n \n-\tWARN_ON_ONCE(p-\u003escx.holding_cpu \u003e= 0);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003escx.holding_cpu \u003e= 0);\n \n \tif (enq_flags \u0026 (SCX_ENQ_HEAD | SCX_ENQ_PREEMPT))\n \t\tlist_add(\u0026p-\u003escx.dsq_list.node, \u0026dst_dsq-\u003elist);\n@@ -2299,8 +2299,8 @@ static void move_remote_task_to_local_dsq(struct task_struct *p, u64 enq_flags,\n \t * truncate the upper 32 bit. As we own @rq, we can pass them through\n \t * @rq-\u003escx.extra_enq_flags instead.\n \t */\n-\tWARN_ON_ONCE(!cpumask_test_cpu(cpu_of(dst_rq), p-\u003ecpus_ptr));\n-\tWARN_ON_ONCE(dst_rq-\u003escx.extra_enq_flags);\n+\tWARN_ON_ONCE_DEFERRED(!cpumask_test_cpu(cpu_of(dst_rq), p-\u003ecpus_ptr));\n+\tWARN_ON_ONCE_DEFERRED(dst_rq-\u003escx.extra_enq_flags);\n \tdst_rq-\u003escx.extra_enq_flags = enq_flags;\n \tactivate_task(dst_rq, p, 0);\n \tdst_rq-\u003escx.extra_enq_flags = 0;\n@@ -2331,7 +2331,7 @@ static bool task_can_run_on_remote_rq(struct scx_sched *sch,\n {\n \ts32 cpu = cpu_of(rq);\n \n-\tWARN_ON_ONCE(task_cpu(p) == cpu);\n+\tWARN_ON_ONCE_DEFERRED(task_cpu(p) == cpu);\n \n \t/*\n \t * If @p has migration disabled, @p-\u003ecpus_ptr is updated to contain only\n@@ -2411,7 +2411,7 @@ static bool unlink_dsq_and_lock_src_rq(struct task_struct *p,\n \n \tlockdep_assert_held(\u0026dsq-\u003elock);\n \n-\tWARN_ON_ONCE(p-\u003escx.holding_cpu \u003e= 0);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003escx.holding_cpu \u003e= 0);\n \ttask_unlink_from_dsq(p, dsq);\n \tp-\u003escx.holding_cpu = cpu;\n \n@@ -2420,7 +2420,7 @@ static bool unlink_dsq_and_lock_src_rq(struct task_struct *p,\n \n \t/* task_rq couldn't have changed if we're still the holding cpu */\n \treturn likely(p-\u003escx.holding_cpu == cpu) \u0026\u0026\n-\t\t!WARN_ON_ONCE(src_rq != task_rq(p));\n+\t\t!WARN_ON_ONCE_DEFERRED(src_rq != task_rq(p));\n }\n \n static bool consume_remote_task(struct rq *this_rq,\n@@ -2630,7 +2630,7 @@ static void dispatch_to_local_dsq(struct scx_sched *sch, struct rq *rq,\n \n \t/* task_rq couldn't have changed if we're still the holding cpu */\n \tif (likely(p-\u003escx.holding_cpu == raw_smp_processor_id()) \u0026\u0026\n-\t !WARN_ON_ONCE(src_rq != task_rq(p))) {\n+\t !WARN_ON_ONCE_DEFERRED(src_rq != task_rq(p))) {\n \t\t/*\n \t\t * If @p is staying on the same rq, there's no need to go\n \t\t * through the full deactivate/activate cycle. Optimize by\n@@ -3099,7 +3099,7 @@ static void put_prev_task_scx(struct rq *rq, struct task_struct *p,\n \t\t * which should trigger an explicit follow-up scheduling event.\n \t\t */\n \t\tif (next \u0026\u0026 sched_class_above(\u0026ext_sched_class, next-\u003esched_class)) {\n-\t\t\tWARN_ON_ONCE(!(sch-\u003eops.flags \u0026 SCX_OPS_ENQ_LAST));\n+\t\t\tWARN_ON_ONCE_DEFERRED(!(sch-\u003eops.flags \u0026 SCX_OPS_ENQ_LAST));\n \t\t\tdo_enqueue_task(rq, p, SCX_ENQ_LAST, -1);\n \t\t} else {\n \t\t\tdo_enqueue_task(rq, p, 0, -1);\n@@ -3201,7 +3201,7 @@ do_pick_task_scx(struct rq *rq, struct rq_flags *rf, bool force_scx)\n \tkeep_prev = rq-\u003escx.flags \u0026 SCX_RQ_BAL_KEEP;\n \tif (unlikely(keep_prev \u0026\u0026\n \t\t prev-\u003esched_class != \u0026ext_sched_class)) {\n-\t\tWARN_ON_ONCE(scx_enable_state() == SCX_ENABLED);\n+\t\tWARN_ON_ONCE_DEFERRED(scx_enable_state() == SCX_ENABLED);\n \t\tkeep_prev = false;\n \t}\n \n@@ -3332,7 +3332,7 @@ static int select_task_rq_scx(struct task_struct *p, int prev_cpu, int wake_flag\n \t\tstruct task_struct **ddsp_taskp;\n \n \t\tddsp_taskp = this_cpu_ptr(\u0026direct_dispatch_task);\n-\t\tWARN_ON_ONCE(*ddsp_taskp);\n+\t\tWARN_ON_ONCE_DEFERRED(*ddsp_taskp);\n \t\t*ddsp_taskp = p;\n \n \t\tthis_rq()-\u003escx.in_select_cpu = true;\n@@ -3620,7 +3620,7 @@ static void __scx_enable_task(struct scx_sched *sch, struct task_struct *p)\n \t * transitions are consistent, the flag should always be clear\n \t * here.\n \t */\n-\tWARN_ON_ONCE(p-\u003escx.flags \u0026 SCX_TASK_IN_CUSTODY);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003escx.flags \u0026 SCX_TASK_IN_CUSTODY);\n \n \t/*\n \t * Set the weight before calling ops.enable() so that the scheduler\n@@ -3651,7 +3651,7 @@ static void scx_disable_task(struct scx_sched *sch, struct task_struct *p)\n \tstruct rq *rq = task_rq(p);\n \n \tlockdep_assert_rq_held(rq);\n-\tWARN_ON_ONCE(scx_get_task_state(p) != SCX_TASK_ENABLED);\n+\tWARN_ON_ONCE_DEFERRED(scx_get_task_state(p) != SCX_TASK_ENABLED);\n \n \tclear_direct_dispatch(p);\n \n@@ -3664,7 +3664,7 @@ static void scx_disable_task(struct scx_sched *sch, struct task_struct *p)\n \t * transitions are consistent, the flag should always be clear\n \t * here.\n \t */\n-\tWARN_ON_ONCE(p-\u003escx.flags \u0026 SCX_TASK_IN_CUSTODY);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003escx.flags \u0026 SCX_TASK_IN_CUSTODY);\n }\n \n static void __scx_disable_and_exit_task(struct scx_sched *sch,\n@@ -3689,7 +3689,7 @@ static void __scx_disable_and_exit_task(struct scx_sched *sch,\n \t\tscx_disable_task(sch, p);\n \t\tbreak;\n \tdefault:\n-\t\tWARN_ON_ONCE(true);\n+\t\tWARN_ON_ONCE_DEFERRED(true);\n \t\treturn;\n \t}\n \n@@ -3726,7 +3726,7 @@ static void scx_disable_and_exit_task(struct scx_sched *sch,\n \t * path, so it's always clear when @p arrives here in %SCX_TASK_NONE.\n \t */\n \tif (p-\u003escx.flags \u0026 SCX_TASK_SUB_INIT) {\n-\t\tif (!WARN_ON_ONCE(!scx_enabling_sub_sched))\n+\t\tif (!WARN_ON_ONCE_DEFERRED(!scx_enabling_sub_sched))\n \t\t\tscx_sub_init_cancel_task(scx_enabling_sub_sched, p);\n \t\tp-\u003escx.flags \u0026= ~SCX_TASK_SUB_INIT;\n \t}\n@@ -3818,7 +3818,7 @@ void scx_cancel_fork(struct task_struct *p)\n \t\tstruct rq_flags rf;\n \n \t\trq = task_rq_lock(p, \u0026rf);\n-\t\tWARN_ON_ONCE(scx_get_task_state(p) \u003e= SCX_TASK_READY);\n+\t\tWARN_ON_ONCE_DEFERRED(scx_get_task_state(p) \u003e= SCX_TASK_READY);\n \t\tscx_disable_and_exit_task(scx_task_sched(p), p);\n \t\ttask_rq_unlock(rq, p, \u0026rf);\n \t}\n@@ -3986,7 +3986,7 @@ static void process_ddsp_deferred_locals(struct rq *rq)\n \t\tclear_direct_dispatch(p);\n \n \t\tdsq = find_dsq_for_dispatch(sch, rq, dsq_id, task_cpu(p));\n-\t\tif (!WARN_ON_ONCE(dsq-\u003eid != SCX_DSQ_LOCAL))\n+\t\tif (!WARN_ON_ONCE_DEFERRED(dsq-\u003eid != SCX_DSQ_LOCAL))\n \t\t\tdispatch_to_local_dsq(sch, rq, dsq, p, enq_flags);\n \t}\n }\n@@ -4041,7 +4041,7 @@ static u32 reenq_local(struct scx_sched *sch, struct rq *rq, u64 reenq_flags)\n \n \tlockdep_assert_rq_held(rq);\n \n-\tif (WARN_ON_ONCE(reenq_flags \u0026 __SCX_REENQ_TSR_MASK))\n+\tif (WARN_ON_ONCE_DEFERRED(reenq_flags \u0026 __SCX_REENQ_TSR_MASK))\n \t\treenq_flags \u0026= ~__SCX_REENQ_TSR_MASK;\n \tif (rq_is_open(rq, 0))\n \t\treenq_flags |= SCX_REENQ_TSR_RQ_OPEN;\n@@ -4078,7 +4078,7 @@ static u32 reenq_local(struct scx_sched *sch, struct rq *rq, u64 reenq_flags)\n \n \t\tdispatch_dequeue(rq, p);\n \n-\t\tif (WARN_ON_ONCE(p-\u003escx.flags \u0026 SCX_TASK_REENQ_REASON_MASK))\n+\t\tif (WARN_ON_ONCE_DEFERRED(p-\u003escx.flags \u0026 SCX_TASK_REENQ_REASON_MASK))\n \t\t\tp-\u003escx.flags \u0026= ~SCX_TASK_REENQ_REASON_MASK;\n \t\tp-\u003escx.flags |= reason;\n \n@@ -4199,7 +4199,7 @@ static void reenq_user(struct rq *rq, struct scx_dispatch_q *dsq, u64 reenq_flag\n \t\tdispatch_dequeue_locked(p, dsq);\n \t\traw_spin_unlock(\u0026dsq-\u003elock);\n \n-\t\tif (WARN_ON_ONCE(p-\u003escx.flags \u0026 SCX_TASK_REENQ_REASON_MASK))\n+\t\tif (WARN_ON_ONCE_DEFERRED(p-\u003escx.flags \u0026 SCX_TASK_REENQ_REASON_MASK))\n \t\t\tp-\u003escx.flags \u0026= ~SCX_TASK_REENQ_REASON_MASK;\n \t\tp-\u003escx.flags |= reason;\n \n@@ -4360,7 +4360,7 @@ int scx_cgroup_can_attach(struct cgroup_taskset *tset)\n \t\tstruct cgroup *from = tg_cgrp(task_group(p));\n \t\tstruct cgroup *to = tg_cgrp(css_tg(css));\n \n-\t\tWARN_ON_ONCE(p-\u003escx.cgrp_moving_from);\n+\t\tWARN_ON_ONCE_DEFERRED(p-\u003escx.cgrp_moving_from);\n \n \t\t/*\n \t\t * sched_move_task() omits identity migrations. Let's match the\n@@ -4617,7 +4617,7 @@ static void exit_dsq(struct scx_dispatch_q *dsq)\n \t\t * There must have been a RCU grace period since the last\n \t\t * insertion and @dsq should be off the deferred list by now.\n \t\t */\n-\t\tif (WARN_ON_ONCE(!list_empty(\u0026dru-\u003enode))) {\n+\t\tif (WARN_ON_ONCE_DEFERRED(!list_empty(\u0026dru-\u003enode))) {\n \t\t\tguard(raw_spinlock_irqsave)(\u0026rq-\u003escx.deferred_reenq_lock);\n \t\t\tlist_del_init(\u0026dru-\u003enode);\n \t\t}\n@@ -4745,7 +4745,7 @@ static int scx_cgroup_init(struct scx_sched *sch)\n \t\ttg-\u003escx.flags |= SCX_TG_INITED;\n \t}\n \n-\tWARN_ON_ONCE(scx_cgroup_enabled);\n+\tWARN_ON_ONCE_DEFERRED(scx_cgroup_enabled);\n \tscx_cgroup_enabled = true;\n \n \treturn 0;\n@@ -4848,7 +4848,7 @@ static void scx_sched_free_rcu_work(struct work_struct *work)\n \t\t * period. As that blocks new deferrals, all\n \t\t * deferred_reenq_local_node's must be off-list by now.\n \t\t */\n-\t\tWARN_ON_ONCE(!list_empty(\u0026pcpu-\u003edeferred_reenq_local.node));\n+\t\tWARN_ON_ONCE_DEFERRED(!list_empty(\u0026pcpu-\u003edeferred_reenq_local.node));\n \n \t\texit_dsq(bypass_dsq(sch, cpu));\n \t}\n@@ -5324,7 +5324,7 @@ static bool inc_bypass_depth(struct scx_sched *sch)\n {\n \tlockdep_assert_held(\u0026scx_bypass_lock);\n \n-\tWARN_ON_ONCE(sch-\u003ebypass_depth \u003c 0);\n+\tWARN_ON_ONCE_DEFERRED(sch-\u003ebypass_depth \u003c 0);\n \tWRITE_ONCE(sch-\u003ebypass_depth, sch-\u003ebypass_depth + 1);\n \tif (sch-\u003ebypass_depth != 1)\n \t\treturn false;\n@@ -5339,7 +5339,7 @@ static bool dec_bypass_depth(struct scx_sched *sch)\n {\n \tlockdep_assert_held(\u0026scx_bypass_lock);\n \n-\tWARN_ON_ONCE(sch-\u003ebypass_depth \u003c 1);\n+\tWARN_ON_ONCE_DEFERRED(sch-\u003ebypass_depth \u003c 1);\n \tWRITE_ONCE(sch-\u003ebypass_depth, sch-\u003ebypass_depth - 1);\n \tif (sch-\u003ebypass_depth != 0)\n \t\treturn false;\n@@ -5360,7 +5360,7 @@ static void enable_bypass_dsp(struct scx_sched *sch)\n \t * @sch-\u003ebypass_depth transitioning from 0 to 1 triggers enabling.\n \t * Shouldn't stagger.\n \t */\n-\tif (WARN_ON_ONCE(test_and_set_bit(0, \u0026sch-\u003ebypass_dsp_claim)))\n+\tif (WARN_ON_ONCE_DEFERRED(test_and_set_bit(0, \u0026sch-\u003ebypass_dsp_claim)))\n \t\treturn;\n \n \t/*\n@@ -5380,11 +5380,11 @@ static void enable_bypass_dsp(struct scx_sched *sch)\n \t * Bump enable depth on both @sch and bypass dispatch host.\n \t */\n \tret = atomic_inc_return(\u0026sch-\u003ebypass_dsp_enable_depth);\n-\tWARN_ON_ONCE(ret \u003c= 0);\n+\tWARN_ON_ONCE_DEFERRED(ret \u003c= 0);\n \n \tif (host != sch) {\n \t\tret = atomic_inc_return(\u0026host-\u003ebypass_dsp_enable_depth);\n-\t\tWARN_ON_ONCE(ret \u003c= 0);\n+\t\tWARN_ON_ONCE_DEFERRED(ret \u003c= 0);\n \t}\n \n \t/*\n@@ -5405,11 +5405,11 @@ static void disable_bypass_dsp(struct scx_sched *sch)\n \t\treturn;\n \n \tret = atomic_dec_return(\u0026sch-\u003ebypass_dsp_enable_depth);\n-\tWARN_ON_ONCE(ret \u003c 0);\n+\tWARN_ON_ONCE_DEFERRED(ret \u003c 0);\n \n \tif (scx_parent(sch)) {\n \t\tret = atomic_dec_return(\u0026scx_parent(sch)-\u003ebypass_dsp_enable_depth);\n-\t\tWARN_ON_ONCE(ret \u003c 0);\n+\t\tWARN_ON_ONCE_DEFERRED(ret \u003c 0);\n \t}\n }\n \ndiff --git a/kernel/sched/fair.c b/kernel/sched/fair.c\nindex 3ebec186f98236..1213e77665fe93 100644\n--- a/kernel/sched/fair.c\n+++ b/kernel/sched/fair.c\n@@ -404,7 +404,7 @@ static inline void list_del_leaf_cfs_rq(struct cfs_rq *cfs_rq)\n \n static inline void assert_list_leaf_cfs_rq(struct rq *rq)\n {\n-\tWARN_ON_ONCE(rq-\u003etmp_alone_branch != \u0026rq-\u003eleaf_cfs_rq_list);\n+\tWARN_ON_ONCE_DEFERRED(rq-\u003etmp_alone_branch != \u0026rq-\u003eleaf_cfs_rq_list);\n }\n \n /* Iterate through all leaf cfs_rq's on a runqueue */\n@@ -689,7 +689,7 @@ __sum_w_vruntime_add(struct cfs_rq *cfs_rq, struct sched_entity *se)\n \ts64 w_vruntime, key = entity_key(cfs_rq, se);\n \n \tw_vruntime = key * weight;\n-\tWARN_ON_ONCE((w_vruntime \u003e\u003e 63) != (w_vruntime \u003e\u003e 62));\n+\tWARN_ON_ONCE_DEFERRED((w_vruntime \u003e\u003e 63) != (w_vruntime \u003e\u003e 62));\n \n \tcfs_rq-\u003esum_w_vruntime += w_vruntime;\n \tcfs_rq-\u003esum_weight += weight;\n@@ -861,7 +861,7 @@ bool update_entity_lag(struct cfs_rq *cfs_rq, struct sched_entity *se)\n \tu64 avruntime = avg_vruntime(cfs_rq);\n \ts64 vlag = entity_lag(cfs_rq, se, avruntime);\n \n-\tWARN_ON_ONCE(!se-\u003eon_rq);\n+\tWARN_ON_ONCE_DEFERRED(!se-\u003eon_rq);\n \n \tif (se-\u003esched_delayed) {\n \t\t/* previous vlag \u003c 0 otherwise se would not be delayed */\n@@ -1153,7 +1153,7 @@ static struct sched_entity *pick_eevdf(struct cfs_rq *cfs_rq, bool protect)\n \tif (sched_feat(PICK_BUDDY) \u0026\u0026 protect \u0026\u0026\n \t cfs_rq-\u003enext \u0026\u0026 entity_eligible(cfs_rq, cfs_rq-\u003enext)) {\n \t\t/* -\u003enext will never be delayed */\n-\t\tWARN_ON_ONCE(cfs_rq-\u003enext-\u003esched_delayed);\n+\t\tWARN_ON_ONCE_DEFERRED(cfs_rq-\u003enext-\u003esched_delayed);\n \t\treturn cfs_rq-\u003enext;\n \t}\n \n@@ -4302,9 +4302,9 @@ static inline bool load_avg_is_decayed(struct sched_avg *sa)\n \t * Make sure that rounding and/or propagation of PELT values never\n \t * break this.\n \t */\n-\tWARN_ON_ONCE(sa-\u003eload_avg ||\n-\t\t sa-\u003eutil_avg ||\n-\t\t sa-\u003erunnable_avg);\n+\tWARN_ON_ONCE_DEFERRED(sa-\u003eload_avg ||\n+\t\t\t sa-\u003eutil_avg ||\n+\t\t\t sa-\u003erunnable_avg);\n \n \treturn true;\n }\n@@ -5460,7 +5460,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)\n \n \t\tweight = avg_vruntime_weight(cfs_rq, se-\u003eload.weight);\n \t\tlag *= load + weight;\n-\t\tif (WARN_ON_ONCE(!load))\n+\t\tif (WARN_ON_ONCE_DEFERRED(!load))\n \t\t\tload = 1;\n \t\tlag = div64_long(lag, load);\n \n@@ -5653,7 +5653,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)\n \tclear_buddies(cfs_rq, se);\n \n \tif (flags \u0026 DEQUEUE_DELAYED) {\n-\t\tWARN_ON_ONCE(!se-\u003esched_delayed);\n+\t\tWARN_ON_ONCE_DEFERRED(!se-\u003esched_delayed);\n \t} else {\n \t\tbool delay = sleep;\n \t\t/*\n@@ -5663,7 +5663,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)\n \t\tif (flags \u0026 (DEQUEUE_SPECIAL | DEQUEUE_THROTTLE))\n \t\t\tdelay = false;\n \n-\t\tWARN_ON_ONCE(delay \u0026\u0026 se-\u003esched_delayed);\n+\t\tWARN_ON_ONCE_DEFERRED(delay \u0026\u0026 se-\u003esched_delayed);\n \n \t\tif (sched_feat(DELAY_DEQUEUE) \u0026\u0026 delay \u0026\u0026\n \t\t !entity_eligible(cfs_rq, se)) {\n@@ -5747,7 +5747,7 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, bool first)\n \t}\n \n \tupdate_stats_curr_start(cfs_rq, se);\n-\tWARN_ON_ONCE(cfs_rq-\u003ecurr);\n+\tWARN_ON_ONCE_DEFERRED(cfs_rq-\u003ecurr);\n \tcfs_rq-\u003ecurr = se;\n \n \t/*\n@@ -5814,7 +5814,7 @@ static void put_prev_entity(struct cfs_rq *cfs_rq, struct sched_entity *prev)\n \t\t/* in !on_rq case, update occurred at dequeue */\n \t\tupdate_load_avg(cfs_rq, prev, 0);\n \t}\n-\tWARN_ON_ONCE(cfs_rq-\u003ecurr != prev);\n+\tWARN_ON_ONCE_DEFERRED(cfs_rq-\u003ecurr != prev);\n \tcfs_rq-\u003ecurr = NULL;\n }\n \n@@ -6015,7 +6015,7 @@ static void throttle_cfs_rq_work(struct callback_head *work)\n \tstruct cfs_rq *cfs_rq;\n \tstruct rq *rq;\n \n-\tWARN_ON_ONCE(p != current);\n+\tWARN_ON_ONCE_DEFERRED(p != current);\n \tp-\u003esched_throttle_work.next = \u0026p-\u003esched_throttle_work;\n \n \t/*\n@@ -6041,7 +6041,7 @@ static void throttle_cfs_rq_work(struct callback_head *work)\n \t\t\treturn;\n \t\trq = scope.rq;\n \t\tupdate_rq_clock(rq);\n-\t\tWARN_ON_ONCE(p-\u003ethrottled || !list_empty(\u0026p-\u003ethrottle_node));\n+\t\tWARN_ON_ONCE_DEFERRED(p-\u003ethrottled || !list_empty(\u0026p-\u003ethrottle_node));\n \t\tdequeue_task_fair(rq, p, DEQUEUE_SLEEP | DEQUEUE_THROTTLE);\n \t\tlist_add(\u0026p-\u003ethrottle_node, \u0026cfs_rq-\u003ethrottled_limbo_list);\n \t\t/*\n@@ -6072,7 +6072,7 @@ void init_cfs_throttle_work(struct task_struct *p)\n static void detach_task_cfs_rq(struct task_struct *p);\n static void dequeue_throttled_task(struct task_struct *p, int flags)\n {\n-\tWARN_ON_ONCE(p-\u003ese.on_rq);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003ese.on_rq);\n \tlist_del_init(\u0026p-\u003ethrottle_node);\n \n \t/* task blocked after throttled */\n@@ -6094,7 +6094,7 @@ static bool enqueue_throttled_task(struct task_struct *p)\n \tstruct cfs_rq *cfs_rq = cfs_rq_of(\u0026p-\u003ese);\n \n \t/* @p should have gone through dequeue_throttled_task() first */\n-\tWARN_ON_ONCE(!list_empty(\u0026p-\u003ethrottle_node));\n+\tWARN_ON_ONCE_DEFERRED(!list_empty(\u0026p-\u003ethrottle_node));\n \n \t/*\n \t * If the throttled task @p is enqueued to a throttled cfs_rq,\n@@ -6162,7 +6162,7 @@ static int tg_unthrottle_up(struct task_group *tg, void *data)\n \n \t\tcfs_rq-\u003ethrottled_clock_self = 0;\n \n-\t\tif (WARN_ON_ONCE((s64)delta \u003c 0))\n+\t\tif (WARN_ON_ONCE_DEFERRED((s64)delta \u003c 0))\n \t\t\tdelta = 0;\n \n \t\tcfs_rq-\u003ethrottled_clock_self_time += delta;\n@@ -6231,8 +6231,8 @@ static int tg_throttle_down(struct task_group *tg, void *data)\n \t\tcfs_rq-\u003epelt_clock_throttled = 1;\n \t}\n \n-\tWARN_ON_ONCE(cfs_rq-\u003ethrottled_clock_self);\n-\tWARN_ON_ONCE(!list_empty(\u0026cfs_rq-\u003ethrottled_limbo_list));\n+\tWARN_ON_ONCE_DEFERRED(cfs_rq-\u003ethrottled_clock_self);\n+\tWARN_ON_ONCE_DEFERRED(!list_empty(\u0026cfs_rq-\u003ethrottled_limbo_list));\n \treturn 0;\n }\n \n@@ -6273,7 +6273,7 @@ static bool throttle_cfs_rq(struct cfs_rq *cfs_rq)\n \t * throttled-list. rq-\u003elock protects completion.\n \t */\n \tcfs_rq-\u003ethrottled = 1;\n-\tWARN_ON_ONCE(cfs_rq-\u003ethrottled_clock);\n+\tWARN_ON_ONCE_DEFERRED(cfs_rq-\u003ethrottled_clock);\n \treturn true;\n }\n \n@@ -6380,7 +6380,7 @@ static inline void __unthrottle_cfs_rq_async(struct cfs_rq *cfs_rq)\n \t}\n \n \t/* Already enqueued */\n-\tif (WARN_ON_ONCE(!list_empty(\u0026cfs_rq-\u003ethrottled_csd_list)))\n+\tif (WARN_ON_ONCE_DEFERRED(!list_empty(\u0026cfs_rq-\u003ethrottled_csd_list)))\n \t\treturn;\n \n \tfirst = list_empty(\u0026rq-\u003ecfsb_csd_list);\n@@ -6393,7 +6393,7 @@ static void unthrottle_cfs_rq_async(struct cfs_rq *cfs_rq)\n {\n \tlockdep_assert_rq_held(rq_of(cfs_rq));\n \n-\tif (WARN_ON_ONCE(!cfs_rq_throttled(cfs_rq) ||\n+\tif (WARN_ON_ONCE_DEFERRED(!cfs_rq_throttled(cfs_rq) ||\n \t cfs_rq-\u003eruntime_remaining \u003c= 0))\n \t\treturn;\n \n@@ -6429,7 +6429,7 @@ static bool distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)\n \t\t\tgoto next;\n \n \t\t/* By the above checks, this should never be true */\n-\t\tWARN_ON_ONCE(cfs_rq-\u003eruntime_remaining \u003e 0);\n+\t\tWARN_ON_ONCE_DEFERRED(cfs_rq-\u003eruntime_remaining \u003e 0);\n \n \t\traw_spin_lock(\u0026cfs_b-\u003elock);\n \t\truntime = -cfs_rq-\u003eruntime_remaining + 1;\n@@ -6450,7 +6450,7 @@ static bool distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)\n \t\t\t\t * We currently only expect to be unthrottling\n \t\t\t\t * a single cfs_rq locally.\n \t\t\t\t */\n-\t\t\t\tWARN_ON_ONCE(!list_empty(\u0026local_unthrottle));\n+\t\t\t\tWARN_ON_ONCE_DEFERRED(!list_empty(\u0026local_unthrottle));\n \t\t\t\tlist_add_tail(\u0026cfs_rq-\u003ethrottled_csd_list,\n \t\t\t\t\t \u0026local_unthrottle);\n \t\t\t}\n@@ -6475,7 +6475,7 @@ static bool distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)\n \n \t\trq_unlock_irqrestore(rq, \u0026rf);\n \t}\n-\tWARN_ON_ONCE(!list_empty(\u0026local_unthrottle));\n+\tWARN_ON_ONCE_DEFERRED(!list_empty(\u0026local_unthrottle));\n \n \trcu_read_unlock();\n \n@@ -7048,7 +7048,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p)\n \tu64 vdelta;\n \tu64 delta;\n \n-\tWARN_ON_ONCE(task_rq(p) != rq);\n+\tWARN_ON_ONCE_DEFERRED(task_rq(p) != rq);\n \n \tif (rq-\u003ecfs.h_nr_queued \u003c= 1)\n \t\treturn;\n@@ -7171,8 +7171,8 @@ requeue_delayed_entity(struct sched_entity *se)\n \t * Because a delayed entity is one that is still on\n \t * the runqueue competing until elegibility.\n \t */\n-\tWARN_ON_ONCE(!se-\u003esched_delayed);\n-\tWARN_ON_ONCE(!se-\u003eon_rq);\n+\tWARN_ON_ONCE_DEFERRED(!se-\u003esched_delayed);\n+\tWARN_ON_ONCE_DEFERRED(!se-\u003eon_rq);\n \n \tif (update_entity_lag(cfs_rq, se)) {\n \t\tcfs_rq-\u003enr_queued--;\n@@ -7409,8 +7409,8 @@ static int dequeue_entities(struct rq *rq, struct sched_entity *se, int flags)\n \t\trq-\u003enext_balance = jiffies;\n \n \tif (p \u0026\u0026 task_delayed) {\n-\t\tWARN_ON_ONCE(!task_sleep);\n-\t\tWARN_ON_ONCE(p-\u003eon_rq != 1);\n+\t\tWARN_ON_ONCE_DEFERRED(!task_sleep);\n+\t\tWARN_ON_ONCE_DEFERRED(p-\u003eon_rq != 1);\n \n \t\t/*\n \t\t * Fix-up what block_task() skipped.\n@@ -8976,7 +8976,7 @@ static void set_cpus_allowed_fair(struct task_struct *p, struct affinity_context\n static void set_next_buddy(struct sched_entity *se)\n {\n \tfor_each_sched_entity(se) {\n-\t\tif (WARN_ON_ONCE(!se-\u003eon_rq))\n+\t\tif (WARN_ON_ONCE_DEFERRED(!se-\u003eon_rq))\n \t\t\treturn;\n \t\tif (se_is_idle(se))\n \t\t\treturn;\n@@ -9023,7 +9023,7 @@ preempt_sync(struct rq *rq, int wake_flags,\n \t * WF_SYNC without WF_TTWU is not expected so warn if it happens even\n \t * though it is likely harmless.\n \t */\n-\tWARN_ON_ONCE(!(wake_flags \u0026 WF_TTWU));\n+\tWARN_ON_ONCE_DEFERRED(!(wake_flags \u0026 WF_TTWU));\n \n \tthreshold = sysctl_sched_migration_cost;\n \tdelta = rq_clock_task(rq) - se-\u003eexec_start;\n@@ -9095,7 +9095,7 @@ static void wakeup_preempt_fair(struct rq *rq, struct task_struct *p, int wake_f\n \t\treturn;\n \n \tfind_matching_se(\u0026se, \u0026pse);\n-\tWARN_ON_ONCE(!pse);\n+\tWARN_ON_ONCE_DEFERRED(!pse);\n \n \tcse_is_idle = se_is_idle(se);\n \tpse_is_idle = se_is_idle(pse);\n@@ -9857,8 +9857,8 @@ static void detach_task(struct task_struct *p, struct lb_env *env)\n \t\tschedstat_inc(p-\u003estats.nr_forced_migrations);\n \t}\n \n-\tWARN_ON(task_current(env-\u003esrc_rq, p));\n-\tWARN_ON(task_current_donor(env-\u003esrc_rq, p));\n+\tWARN_ON_DEFERRED(task_current(env-\u003esrc_rq, p));\n+\tWARN_ON_DEFERRED(task_current_donor(env-\u003esrc_rq, p));\n \n \tdeactivate_task(env-\u003esrc_rq, p, DEQUEUE_NOCLOCK);\n \tset_task_cpu(p, env-\u003edst_cpu);\n@@ -12151,7 +12151,7 @@ static int sched_balance_rq(int this_cpu, struct rq *this_rq,\n \t\tgoto out_balanced;\n \t}\n \n-\tWARN_ON_ONCE(busiest == env.dst_rq);\n+\tWARN_ON_ONCE_DEFERRED(busiest == env.dst_rq);\n \n \tupdate_lb_imbalance_stat(\u0026env, sd, idle);\n \n@@ -12461,7 +12461,7 @@ static int active_load_balance_cpu_stop(void *data)\n \t * we need to fix it. Originally reported by\n \t * Bjorn Helgaas on a 128-CPU setup.\n \t */\n-\tWARN_ON_ONCE(busiest_rq == target_rq);\n+\tWARN_ON_ONCE_DEFERRED(busiest_rq == target_rq);\n \n \t/* Search for an sd spanning us and the target CPU. */\n \trcu_read_lock();\n@@ -12883,7 +12883,7 @@ static void set_cpu_sd_state_busy(int cpu)\n \n void nohz_balance_exit_idle(struct rq *rq)\n {\n-\tWARN_ON_ONCE(rq != this_rq());\n+\tWARN_ON_ONCE_DEFERRED(rq != this_rq());\n \n \tif (likely(!rq-\u003enohz_tick_stopped))\n \t\treturn;\n@@ -12918,7 +12918,7 @@ void nohz_balance_enter_idle(int cpu)\n {\n \tstruct rq *rq = cpu_rq(cpu);\n \n-\tWARN_ON_ONCE(cpu != smp_processor_id());\n+\tWARN_ON_ONCE_DEFERRED(cpu != smp_processor_id());\n \n \t/* If this CPU is going down, then nothing needs to be done: */\n \tif (!cpu_active(cpu))\n@@ -13000,7 +13000,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)\n \tint balance_cpu;\n \tstruct rq *rq;\n \n-\tWARN_ON_ONCE((flags \u0026 NOHZ_KICK_MASK) == NOHZ_BALANCE_KICK);\n+\tWARN_ON_ONCE_DEFERRED((flags \u0026 NOHZ_KICK_MASK) == NOHZ_BALANCE_KICK);\n \n \t/*\n \t * We assume there will be no idle load after this update and clear\n@@ -13623,7 +13623,7 @@ bool cfs_prio_less(const struct task_struct *a, const struct task_struct *b,\n \tstruct cfs_rq *cfs_rqb;\n \ts64 delta;\n \n-\tWARN_ON_ONCE(task_rq(b)-\u003ecore != rq-\u003ecore);\n+\tWARN_ON_ONCE_DEFERRED(task_rq(b)-\u003ecore != rq-\u003ecore);\n \n #ifdef CONFIG_FAIR_GROUP_SCHED\n \t/*\n@@ -13839,7 +13839,7 @@ static void switched_from_fair(struct rq *rq, struct task_struct *p)\n \n static void switched_to_fair(struct rq *rq, struct task_struct *p)\n {\n-\tWARN_ON_ONCE(p-\u003ese.sched_delayed);\n+\tWARN_ON_ONCE_DEFERRED(p-\u003ese.sched_delayed);\n \n \tattach_task_cfs_rq(p);\n \n@@ -13872,7 +13872,7 @@ static void __set_next_task_fair(struct rq *rq, struct task_struct *p, bool firs\n \tif (!first)\n \t\treturn;\n \n-\tWARN_ON_ONCE(se-\u003esched_delayed);\n+\tWARN_ON_ONCE_DEFERRED(se-\u003esched_delayed);\n \n \tif (hrtick_enabled_fair(rq))\n \t\thrtick_start_fair(rq, p);\n@@ -14148,7 +14148,7 @@ int sched_group_set_idle(struct task_group *tg, long idle)\n \t\trq_lock_irqsave(rq, \u0026rf);\n \n \t\tgrp_cfs_rq-\u003eidle = idle;\n-\t\tif (WARN_ON_ONCE(was_idle == cfs_rq_is_idle(grp_cfs_rq)))\n+\t\tif (WARN_ON_ONCE_DEFERRED(was_idle == cfs_rq_is_idle(grp_cfs_rq)))\n \t\t\tgoto next_cpu;\n \n \t\tidle_task_delta = grp_cfs_rq-\u003eh_nr_queued -\ndiff --git a/kernel/sched/rt.c b/kernel/sched/rt.c\nindex 4ee8faf01441a3..506d0f1afa58f9 100644\n--- a/kernel/sched/rt.c\n+++ b/kernel/sched/rt.c\n@@ -170,7 +170,7 @@ static void destroy_rt_bandwidth(struct rt_bandwidth *rt_b)\n \n static inline struct task_struct *rt_task_of(struct sched_rt_entity *rt_se)\n {\n-\tWARN_ON_ONCE(!rt_entity_is_task(rt_se));\n+\tWARN_ON_ONCE_DEFERRED(!rt_entity_is_task(rt_se));\n \n \treturn container_of(rt_se, struct task_struct, rt);\n }\n@@ -178,13 +178,13 @@ static inline struct task_struct *rt_task_of(struct sched_rt_entity *rt_se)\n static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq)\n {\n \t/* Cannot fold with non-CONFIG_RT_GROUP_SCHED version, layout */\n-\tWARN_ON(!rt_group_sched_enabled() \u0026\u0026 rt_rq-\u003etg != \u0026root_task_group);\n+\tWARN_ON_DEFERRED(!rt_group_sched_enabled() \u0026\u0026 rt_rq-\u003etg != \u0026root_task_group);\n \treturn rt_rq-\u003erq;\n }\n \n static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)\n {\n-\tWARN_ON(!rt_group_sched_enabled() \u0026\u0026 rt_se-\u003ert_rq-\u003etg != \u0026root_task_group);\n+\tWARN_ON_DEFERRED(!rt_group_sched_enabled() \u0026\u0026 rt_se-\u003ert_rq-\u003etg != \u0026root_task_group);\n \treturn rt_se-\u003ert_rq;\n }\n \n@@ -192,7 +192,7 @@ static inline struct rq *rq_of_rt_se(struct sched_rt_entity *rt_se)\n {\n \tstruct rt_rq *rt_rq = rt_se-\u003ert_rq;\n \n-\tWARN_ON(!rt_group_sched_enabled() \u0026\u0026 rt_rq-\u003etg != \u0026root_task_group);\n+\tWARN_ON_DEFERRED(!rt_group_sched_enabled() \u0026\u0026 rt_rq-\u003etg != \u0026root_task_group);\n \treturn rt_rq-\u003erq;\n }\n \n@@ -493,7 +493,7 @@ typedef struct task_group *rt_rq_iter_t;\n static inline struct task_group *next_task_group(struct task_group *tg)\n {\n \tif (!rt_group_sched_enabled()) {\n-\t\tWARN_ON(tg != \u0026root_task_group);\n+\t\tWARN_ON_DEFERRED(tg != \u0026root_task_group);\n \t\treturn NULL;\n \t}\n \n@@ -723,7 +723,7 @@ static void __disable_runtime(struct rq *rq)\n \t\t * We cannot be left wanting - that would mean some runtime\n \t\t * leaked out of the system.\n \t\t */\n-\t\tWARN_ON_ONCE(want);\n+\t\tWARN_ON_ONCE_DEFERRED(want);\n balanced:\n \t\t/*\n \t\t * Disable all the borrow logic by pretending we have inf\n@@ -1094,7 +1094,7 @@ dec_rt_prio(struct rt_rq *rt_rq, int prio)\n \n \tif (rt_rq-\u003ert_nr_running) {\n \n-\t\tWARN_ON(prio \u003c prev_prio);\n+\t\tWARN_ON_DEFERRED(prio \u003c prev_prio);\n \n \t\t/*\n \t\t * This may have been our highest task, and therefore\n@@ -1131,7 +1131,7 @@ dec_rt_group(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)\n \tif (rt_se_boosted(rt_se))\n \t\trt_rq-\u003ert_nr_boosted--;\n \n-\tWARN_ON(!rt_rq-\u003ert_nr_running \u0026\u0026 rt_rq-\u003ert_nr_boosted);\n+\tWARN_ON_DEFERRED(!rt_rq-\u003ert_nr_running \u0026\u0026 rt_rq-\u003ert_nr_boosted);\n }\n \n #else /* !CONFIG_RT_GROUP_SCHED: */\n@@ -1176,7 +1176,7 @@ void inc_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)\n {\n \tint prio = rt_se_prio(rt_se);\n \n-\tWARN_ON(!rt_prio(prio));\n+\tWARN_ON_DEFERRED(!rt_prio(prio));\n \trt_rq-\u003ert_nr_running += rt_se_nr_running(rt_se);\n \trt_rq-\u003err_nr_running += rt_se_rr_nr_running(rt_se);\n \n@@ -1187,8 +1187,8 @@ void inc_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)\n static inline\n void dec_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)\n {\n-\tWARN_ON(!rt_prio(rt_se_prio(rt_se)));\n-\tWARN_ON(!rt_rq-\u003ert_nr_running);\n+\tWARN_ON_DEFERRED(!rt_prio(rt_se_prio(rt_se)));\n+\tWARN_ON_DEFERRED(!rt_rq-\u003ert_nr_running);\n \trt_rq-\u003ert_nr_running -= rt_se_nr_running(rt_se);\n \trt_rq-\u003err_nr_running -= rt_se_rr_nr_running(rt_se);\n \n@@ -1348,7 +1348,7 @@ static void __enqueue_rt_entity(struct sched_rt_entity *rt_se, unsigned int flag\n \t}\n \n \tif (move_entity(flags)) {\n-\t\tWARN_ON_ONCE(rt_se-\u003eon_list);\n+\t\tWARN_ON_ONCE_DEFERRED(rt_se-\u003eon_list);\n \t\tif (flags \u0026 ENQUEUE_HEAD)\n \t\t\tlist_add(\u0026rt_se-\u003erun_list, queue);\n \t\telse\n@@ -1368,7 +1368,7 @@ static void __dequeue_rt_entity(struct sched_rt_entity *rt_se, unsigned int flag\n \tstruct rt_prio_array *array = \u0026rt_rq-\u003eactive;\n \n \tif (move_entity(flags)) {\n-\t\tWARN_ON_ONCE(!rt_se-\u003eon_list);\n+\t\tWARN_ON_ONCE_DEFERRED(!rt_se-\u003eon_list);\n \t\t__delist_rt_entity(rt_se, array);\n \t}\n \trt_se-\u003eon_rq = 0;\n@@ -1684,7 +1684,7 @@ static struct sched_rt_entity *pick_next_rt_entity(struct rt_rq *rt_rq)\n \tBUG_ON(idx \u003e= MAX_RT_PRIO);\n \n \tqueue = array-\u003equeue + idx;\n-\tif (WARN_ON_ONCE(list_empty(queue)))\n+\tif (WARN_ON_ONCE_DEFERRED(list_empty(queue)))\n \t\treturn NULL;\n \tnext = list_entry(queue-\u003enext, struct sched_rt_entity, run_list);\n \n@@ -2016,7 +2016,7 @@ static int push_rt_task(struct rq *rq, bool pull)\n \t\treturn 0;\n \t}\n \n-\tif (WARN_ON(next_task == rq-\u003ecurr))\n+\tif (WARN_ON_DEFERRED(next_task == rq-\u003ecurr))\n \t\treturn 0;\n \n \t/* We might release rq lock */\n@@ -2316,8 +2316,8 @@ static void pull_rt_task(struct rq *this_rq)\n \t\t * the to-be-scheduled task?\n \t\t */\n \t\tif (p \u0026\u0026 (p-\u003eprio \u003c this_rq-\u003ert.highest_prio.curr)) {\n-\t\t\tWARN_ON(p == src_rq-\u003ecurr);\n-\t\t\tWARN_ON(!task_on_rq_queued(p));\n+\t\t\tWARN_ON_DEFERRED(p == src_rq-\u003ecurr);\n+\t\t\tWARN_ON_DEFERRED(!task_on_rq_queued(p));\n \n \t\t\t/*\n \t\t\t * There's a chance that p is higher in priority\n@@ -2583,7 +2583,7 @@ static int task_is_throttled_rt(struct task_struct *p, int cpu)\n \n #ifdef CONFIG_RT_GROUP_SCHED // XXX maybe add task_rt_rq(), see also sched_rt_period_rt_rq\n \trt_rq = task_group(p)-\u003ert_rq[cpu];\n-\tWARN_ON(!rt_group_sched_enabled() \u0026\u0026 rt_rq-\u003etg != \u0026root_task_group);\n+\tWARN_ON_DEFERRED(!rt_group_sched_enabled() \u0026\u0026 rt_rq-\u003etg != \u0026root_task_group);\n #else\n \trt_rq = \u0026cpu_rq(cpu)-\u003ert;\n #endif\ndiff --git a/kernel/sched/sched.h b/kernel/sched/sched.h\nindex 9f63b15d309d11..f74f9cd44e0986 100644\n--- a/kernel/sched/sched.h\n+++ b/kernel/sched/sched.h\n@@ -1684,7 +1684,7 @@ static inline void update_idle_core(struct rq *rq) { }\n \n static inline struct task_struct *task_of(struct sched_entity *se)\n {\n-\tWARN_ON_ONCE(!entity_is_task(se));\n+\tWARN_ON_ONCE_DEFERRED(!entity_is_task(se));\n \treturn container_of(se, struct task_struct, se);\n }\n \n@@ -1766,7 +1766,7 @@ static inline void assert_clock_updated(struct rq *rq)\n \t * The only reason for not seeing a clock update since the\n \t * last rq_pin_lock() is if we're currently skipping updates.\n \t */\n-\tWARN_ON_ONCE(rq-\u003eclock_update_flags \u003c RQCF_ACT_SKIP);\n+\tWARN_ON_ONCE_DEFERRED(rq-\u003eclock_update_flags \u003c RQCF_ACT_SKIP);\n }\n \n static inline u64 rq_clock(struct rq *rq)\n@@ -1813,7 +1813,7 @@ static inline void rq_clock_cancel_skipupdate(struct rq *rq)\n static inline void rq_clock_start_loop_update(struct rq *rq)\n {\n \tlockdep_assert_rq_held(rq);\n-\tWARN_ON_ONCE(rq-\u003eclock_update_flags \u0026 RQCF_ACT_SKIP);\n+\tWARN_ON_ONCE_DEFERRED(rq-\u003eclock_update_flags \u0026 RQCF_ACT_SKIP);\n \trq-\u003eclock_update_flags |= RQCF_ACT_SKIP;\n }\n \n@@ -1870,9 +1870,9 @@ static inline void scx_rq_clock_invalidate(struct rq *rq) {}\n \n static inline void assert_balance_callbacks_empty(struct rq *rq)\n {\n-\tWARN_ON_ONCE(IS_ENABLED(CONFIG_PROVE_LOCKING) \u0026\u0026\n-\t\t rq-\u003ebalance_callback \u0026\u0026\n-\t\t rq-\u003ebalance_callback != \u0026balance_push_callback);\n+\tWARN_ON_ONCE_DEFERRED(IS_ENABLED(CONFIG_PROVE_LOCKING) \u0026\u0026\n+\t\t\t rq-\u003ebalance_callback \u0026\u0026\n+\t\t\t rq-\u003ebalance_callback != \u0026balance_push_callback);\n }\n \n /*\n@@ -2681,7 +2681,7 @@ struct sched_class {\n \n static inline void put_prev_task(struct rq *rq, struct task_struct *prev)\n {\n-\tWARN_ON_ONCE(rq-\u003edonor != prev);\n+\tWARN_ON_ONCE_DEFERRED(rq-\u003edonor != prev);\n \tprev-\u003esched_class-\u003eput_prev_task(rq, prev, NULL);\n }\n \n@@ -2704,7 +2704,7 @@ static inline void put_prev_set_next_task(struct rq *rq,\n \t\t\t\t\t struct task_struct *prev,\n \t\t\t\t\t struct task_struct *next)\n {\n-\tWARN_ON_ONCE(rq-\u003edonor != prev);\n+\tWARN_ON_ONCE_DEFERRED(rq-\u003edonor != prev);\n \n \t__put_prev_set_next_dl_server(rq, prev, next);\n \n@@ -3030,7 +3030,7 @@ static inline void attach_task(struct rq *rq, struct task_struct *p)\n {\n \tlockdep_assert_rq_held(rq);\n \n-\tWARN_ON_ONCE(task_rq(p) != rq);\n+\tWARN_ON_ONCE_DEFERRED(task_rq(p) != rq);\n \tactivate_task(rq, p, ENQUEUE_NOCLOCK);\n \twakeup_preempt(rq, p, 0);\n }\ndiff --git a/lib/bug.c b/lib/bug.c\nindex 224f4cfa4aa312..f5768f5d17b479 100644\n--- a/lib/bug.c\n+++ b/lib/bug.c\n@@ -196,7 +196,7 @@ void __warn_printf(const char *fmt, struct pt_regs *regs)\n \n static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long bugaddr, struct pt_regs *regs)\n {\n-\tbool warning, once, done, no_cut, has_args;\n+\tbool warning, once, done, no_cut, has_args, deferred;\n \tconst char *file, *fmt;\n \tunsigned line;\n \n@@ -219,6 +219,7 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga\n \tdone = bug-\u003eflags \u0026 BUGFLAG_DONE;\n \tno_cut = bug-\u003eflags \u0026 BUGFLAG_NO_CUT_HERE;\n \thas_args = bug-\u003eflags \u0026 BUGFLAG_ARGS;\n+\tdeferred = bug-\u003eflags \u0026 BUGFLAG_DEFERRED;\n \n \tif (warning \u0026\u0026 once) {\n \t\tif (done)\n@@ -229,7 +230,10 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga\n \t\t */\n \t\tbug-\u003eflags |= BUGFLAG_DONE;\n \t}\n-\n+\tif (deferred) {\n+\t\tpreempt_disable_notrace();\n+\t\tprintk_deferred_enter();\n+\t}\n \t/*\n \t * BUG() and WARN_ON() families don't print a custom debug message\n \t * before triggering the exception handler, so we must add the\n@@ -245,6 +249,10 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga\n \t\t/* this is a WARN_ON rather than BUG/BUG_ON */\n \t\t__warn(file, line, (void *)bugaddr, BUG_GET_TAINT(bug), regs,\n \t\t NULL);\n+\t\tif (deferred) {\n+\t\t\tprintk_deferred_exit();\n+\t\t\tpreempt_enable_notrace();\n+\t\t}\n \t\treturn BUG_TRAP_TYPE_WARN;\n \t}\n \n@@ -254,6 +262,10 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga\n \t\tpr_crit(\"kernel BUG at %pB [verbose debug info unavailable]\\n\",\n \t\t\t(void *)bugaddr);\n \n+\tif (deferred) {\n+\t\tprintk_deferred_exit();\n+\t\tpreempt_enable_notrace();\n+\t}\n \treturn BUG_TRAP_TYPE_BUG;\n }\n \n"
} |
| 2/1 | 2026/06/23 14:53 | agent | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only introduces and applies deferred variants of WARN_ON and WARN_ON_ONCE macros (WARN_ON_DEFERRED, WARN_ON_ONCE_DEFERRED) to avoid deadlocks during warning prints in the scheduler. This is purely a logging/decorative change that does not functionally alter the normal execution flow of the kernel.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Do not list too generic configs (we already have them enabled). Only list those that specifically cover the modified code. List them in the EnableConfigs output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4"). Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt: For your convenience, here is the diff of the changes:
commit 04f67bc0910aefb9a52a451de236cf05ef39894d
Author: syz-cluster <triage@syzkaller.com>
Date: Tue Jun 23 14:52:56 2026 +0000
syz-cluster: applied patch under review
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 09e8eccee8ed97..1e3ff00f709b89 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -14,6 +14,7 @@
#define BUGFLAG_DONE (1 << 2)
#define BUGFLAG_NO_CUT_HERE (1 << 3) /* CUT_HERE already sent */
#define BUGFLAG_ARGS (1 << 4)
+#define BUGFLAG_DEFERRED (1 << 5)
#define BUGFLAG_TAINT(taint) ((taint) << 8)
#define BUG_GET_TAINT(bug) ((bug)->flags >> 8)
#endif
@@ -115,6 +116,16 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
})
#endif
+#define WARN_ON_DEFERRED(condition) ({ \
+ int __ret_warn_on = !!(condition); \
+ if (unlikely(__ret_warn_on)) { \
+ __WARN_FLAGS(#condition, \
+ BUGFLAG_DEFERRED | \
+ BUGFLAG_TAINT(TAINT_WARN)); \
+ } \
+ unlikely(__ret_warn_on); \
+})
+
#ifndef WARN_ON_ONCE
#define WARN_ON_ONCE(condition) ({ \
int __ret_warn_on = !!(condition); \
@@ -125,6 +136,16 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
unlikely(__ret_warn_on); \
})
#endif
+
+#define WARN_ON_ONCE_DEFERRED(condition) ({ \
+ int __ret_warn_on = !!(condition); \
+ if (unlikely(__ret_warn_on)) { \
+ __WARN_FLAGS(#condition, \
+ BUGFLAG_ONCE | BUGFLAG_DEFERRED | \
+ BUGFLAG_TAINT(TAINT_WARN)); \
+ } \
+ unlikely(__ret_warn_on); \
+})
#endif /* __WARN_FLAGS */
#if defined(__WARN_FLAGS) && !defined(__WARN_printf)
@@ -159,6 +180,19 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
})
#endif
+#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
+
#ifndef WARN
#define WARN(condition, format...) ({ \
int __ret_warn_on = !!(condition); \
@@ -180,6 +214,11 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
DO_ONCE_LITE_IF(condition, WARN_ON, 1)
#endif
+#ifndef WARN_ON_ONCE_DEFERRED
+#define WARN_ON_ONCE_DEFERRED(condition) \
+ DO_ONCE_LITE_IF(condition, WARN_ON_DEFERRED, 1)
+#endif
+
#ifndef WARN_ONCE
#define WARN_ONCE(condition, format...) \
DO_ONCE_LITE_IF(condition, WARN, 1, format)
@@ -215,7 +254,9 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
})
#endif
+#define WARN_ON_DEFERRED(condition) WARN_ON(condition)
#define WARN_ON_ONCE(condition) WARN_ON(condition)
+#define WARN_ON_ONCE_DEFERRED(condition) WARN_ON(condition)
#define WARN_ONCE(condition, format...) WARN(condition, format)
#define WARN_TAINT(condition, taint, format...) WARN(condition, format)
#define WARN_TAINT_ONCE(condition, taint, format...) WARN(condition, format)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b8871449d3c694..0e282457abb917 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -853,7 +853,7 @@ void update_rq_clock(struct rq *rq)
return;
if (sched_feat(WARN_DOUBLE_CLOCK))
- WARN_ON_ONCE(rq->clock_update_flags & RQCF_UPDATED);
+ WARN_ON_ONCE_DEFERRED(rq->clock_update_flags & RQCF_UPDATED);
rq->clock_update_flags |= RQCF_UPDATED;
clock = sched_clock_cpu(cpu_of(rq));
@@ -1807,7 +1807,7 @@ static inline void uclamp_rq_dec_id(struct rq *rq, struct task_struct *p,
bucket = &uc_rq->bucket[uc_se->bucket_id];
- WARN_ON_ONCE(!bucket->tasks);
+ WARN_ON_ONCE_DEFERRED(!bucket->tasks);
if (likely(bucket->tasks))
bucket->tasks--;
@@ -1827,7 +1827,7 @@ static inline void uclamp_rq_dec_id(struct rq *rq, struct task_struct *p,
* Defensive programming: this should never happen. If it happens,
* e.g. due to future modification, warn and fix up the expected value.
*/
- WARN_ON_ONCE(bucket->value > rq_clamp);
+ WARN_ON_ONCE_DEFERRED(bucket->value > rq_clamp);
if (bucket->value >= rq_clamp) {
bkt_clamp = uclamp_rq_max_value(rq, clamp_id, uc_se->value);
uclamp_rq_set(rq, clamp_id, bkt_clamp);
@@ -2210,7 +2210,7 @@ void activate_task(struct rq *rq, struct task_struct *p, int flags)
void deactivate_task(struct rq *rq, struct task_struct *p, int flags)
{
- WARN_ON_ONCE(flags & DEQUEUE_SLEEP);
+ WARN_ON_ONCE_DEFERRED(flags & DEQUEUE_SLEEP);
WRITE_ONCE(p->on_rq, TASK_ON_RQ_MIGRATING);
ASSERT_EXCLUSIVE_WRITER(p->on_rq);
@@ -2516,7 +2516,7 @@ static struct rq *move_queued_task(struct rq *rq, struct rq_flags *rf,
rq = cpu_rq(new_cpu);
rq_lock(rq, rf);
- WARN_ON_ONCE(task_cpu(p) != new_cpu);
+ WARN_ON_ONCE_DEFERRED(task_cpu(p) != new_cpu);
activate_task(rq, p, 0);
wakeup_preempt(rq, p, 0);
@@ -2602,7 +2602,7 @@ static int migration_cpu_stop(void *data)
* If we were passed a pending, then ->stop_pending was set, thus
* p->migration_pending must have remained stable.
*/
- WARN_ON_ONCE(pending && pending != p->migration_pending);
+ WARN_ON_ONCE_DEFERRED(pending && pending != p->migration_pending);
/*
* If task_rq(p) != rq, it cannot be migrated here, because we're
@@ -2661,7 +2661,7 @@ static int migration_cpu_stop(void *data)
* determine is_migration_disabled() and so have to chase after
* it.
*/
- WARN_ON_ONCE(!pending->stop_pending);
+ WARN_ON_ONCE_DEFERRED(!pending->stop_pending);
preempt_disable();
rq_unlock(rq, &rf);
raw_spin_unlock_irqrestore(&p->pi_lock, rf.flags);
@@ -3004,7 +3004,7 @@ static int affine_move_task(struct rq *rq, struct task_struct *p, struct rq_flag
*
* Either way, we really should have a @pending here.
*/
- if (WARN_ON_ONCE(!pending)) {
+ if (WARN_ON_ONCE_DEFERRED(!pending)) {
task_rq_unlock(rq, p, rf);
return -EINVAL;
}
@@ -3116,9 +3116,9 @@ static int __set_cpus_allowed_ptr_locked(struct task_struct *p,
goto out;
}
- if (WARN_ON_ONCE(p == current &&
- is_migration_disabled(p) &&
- !cpumask_test_cpu(task_cpu(p), ctx->new_mask))) {
+ if (WARN_ON_ONCE_DEFERRED(p == current &&
+ is_migration_disabled(p) &&
+ !cpumask_test_cpu(task_cpu(p), ctx->new_mask))) {
ret = -EBUSY;
goto out;
}
@@ -3267,7 +3267,7 @@ void force_compatible_cpus_allowed_ptr(struct task_struct *p)
cpumask_pr_args(override_mask));
}
- WARN_ON(set_cpus_allowed_ptr(p, override_mask));
+ WARN_ON_DEFERRED(set_cpus_allowed_ptr(p, override_mask));
out_free_mask:
cpus_read_unlock();
free_cpumask_var(new_mask);
@@ -3293,7 +3293,7 @@ void relax_compatible_cpus_allowed_ptr(struct task_struct *p)
* Cpuset masking will be done there too.
*/
ret = __sched_setaffinity(p, &ac);
- WARN_ON_ONCE(ret);
+ WARN_ON_ONCE_DEFERRED(ret);
}
#ifdef CONFIG_SMP
@@ -3306,16 +3306,16 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
* We should never call set_task_cpu() on a blocked task,
* ttwu() will sort out the placement.
*/
- WARN_ON_ONCE(state != TASK_RUNNING && state != TASK_WAKING && !p->on_rq);
+ WARN_ON_ONCE_DEFERRED(state != TASK_RUNNING && state != TASK_WAKING && !p->on_rq);
/*
* Migrating fair class task must have p->on_rq = TASK_ON_RQ_MIGRATING,
* because schedstat_wait_{start,end} rebase migrating task's wait_start
* time relying on p->on_rq.
*/
- WARN_ON_ONCE(state == TASK_RUNNING &&
- p->sched_class == &fair_sched_class &&
- (p->on_rq && !task_on_rq_migrating(p)));
+ WARN_ON_ONCE_DEFERRED(state == TASK_RUNNING &&
+ p->sched_class == &fair_sched_class &&
+ (p->on_rq && !task_on_rq_migrating(p)));
#ifdef CONFIG_LOCKDEP
/*
@@ -3328,15 +3328,15 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
* Furthermore, all task_rq users should acquire both locks, see
* task_rq_lock().
*/
- WARN_ON_ONCE(debug_locks && !(lockdep_is_held(&p->pi_lock) ||
- lockdep_is_held(__rq_lockp(task_rq(p)))));
+ WARN_ON_ONCE_DEFERRED(debug_locks && !(lockdep_is_held(&p->pi_lock) ||
+ lockdep_is_held(__rq_lockp(task_rq(p)))));
#endif
/*
* Clearly, migrating tasks to offline CPUs is a fairly daft thing.
*/
- WARN_ON_ONCE(!cpu_online(new_cpu));
+ WARN_ON_ONCE_DEFERRED(!cpu_online(new_cpu));
- WARN_ON_ONCE(is_migration_disabled(p));
+ WARN_ON_ONCE_DEFERRED(is_migration_disabled(p));
trace_sched_migrate_task(p, new_cpu);
@@ -3803,10 +3803,10 @@ void sched_ttwu_pending(void *arg)
update_rq_clock(rq);
llist_for_each_entry_safe(p, t, llist, wake_entry.llist) {
- if (WARN_ON_ONCE(p->on_cpu))
+ if (WARN_ON_ONCE_DEFERRED(p->on_cpu))
smp_cond_load_acquire(&p->on_cpu, !VAL);
- if (WARN_ON_ONCE(task_cpu(p) != cpu_of(rq)))
+ if (WARN_ON_ONCE_DEFERRED(task_cpu(p) != cpu_of(rq)))
set_task_cpu(p, cpu_of(rq));
ttwu_do_activate(rq, p, p->sched_remote_wakeup ? WF_MIGRATED : 0, &rf);
@@ -4003,8 +4003,8 @@ bool ttwu_state_match(struct task_struct *p, unsigned int state, int *success)
int match;
if (IS_ENABLED(CONFIG_DEBUG_PREEMPT)) {
- WARN_ON_ONCE((state & TASK_RTLOCK_WAIT) &&
- state != TASK_RTLOCK_WAIT);
+ WARN_ON_ONCE_DEFERRED((state & TASK_RTLOCK_WAIT) &&
+ state != TASK_RTLOCK_WAIT);
}
*success = !!(match = __task_state_match(p, state));
@@ -5745,7 +5745,7 @@ static void sched_tick_remote(struct work_struct *work)
* we are always sure that there is no proxy (only a
* single task is running).
*/
- WARN_ON_ONCE(rq->curr != rq->donor);
+ WARN_ON_ONCE_DEFERRED(rq->curr != rq->donor);
update_rq_clock(rq);
if (!is_idle_task(curr)) {
@@ -5754,7 +5754,7 @@ static void sched_tick_remote(struct work_struct *work)
* reasonable amount of time.
*/
u64 delta = rq_clock_task(rq) - curr->se.exec_start;
- WARN_ON_ONCE(delta > (u64)NSEC_PER_SEC * 30);
+ WARN_ON_ONCE_DEFERRED(delta > (u64)NSEC_PER_SEC * 30);
}
curr->sched_class->task_tick(rq, curr, 0);
@@ -5769,7 +5769,7 @@ static void sched_tick_remote(struct work_struct *work)
* first update state to reflect hotplug activity if required.
*/
os = atomic_fetch_add_unless(&twork->state, -1, TICK_SCHED_REMOTE_RUNNING);
- WARN_ON_ONCE(os == TICK_SCHED_REMOTE_OFFLINE);
+ WARN_ON_ONCE_DEFERRED(os == TICK_SCHED_REMOTE_OFFLINE);
if (os == TICK_SCHED_REMOTE_RUNNING)
queue_delayed_work(system_dfl_wq, dwork, HZ);
}
@@ -6196,7 +6196,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
* For robustness, update the min_vruntime_fi for
* unconstrained picks as well.
*/
- WARN_ON_ONCE(fi_before);
+ WARN_ON_ONCE_DEFERRED(fi_before);
task_vruntime_update(rq, next, false);
goto out_set_next;
}
@@ -6274,7 +6274,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
rq->core_sched_seq = rq->core->core_pick_seq;
/* Something should have been selected for current CPU */
- WARN_ON_ONCE(!next);
+ WARN_ON_ONCE_DEFERRED(!next);
/*
* Reschedule siblings
@@ -6317,7 +6317,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
}
/* Did we break L1TF mitigation requirements? */
- WARN_ON_ONCE(!cookie_match(next, rq_i->core_pick));
+ WARN_ON_ONCE_DEFERRED(!cookie_match(next, rq_i->core_pick));
if (rq_i->curr == rq_i->core_pick) {
rq_i->core_pick = NULL;
@@ -6717,7 +6717,7 @@ static void proxy_migrate_task(struct rq *rq, struct rq_flags *rf,
struct rq *target_rq = cpu_rq(target_cpu);
lockdep_assert_rq_held(rq);
- WARN_ON(p == rq->curr);
+ WARN_ON_DEFERRED(p == rq->curr);
/*
* Since we are migrating a blocked donor, it could be rq->donor,
* and we want to make sure there aren't any references from this
@@ -6749,7 +6749,7 @@ static void proxy_force_return(struct rq *rq, struct rq_flags *rf,
int cpu, wake_flag = WF_TTWU;
lockdep_assert_rq_held(rq);
- WARN_ON(p == rq->curr);
+ WARN_ON_DEFERRED(p == rq->curr);
if (p == rq->donor)
proxy_resched_idle(rq);
@@ -6951,7 +6951,7 @@ find_proxy_task(struct rq *rq, struct task_struct *donor, struct rq_flags *rf)
* guarantee its existence, as per ttwu_remote().
*/
}
- WARN_ON_ONCE(owner && !owner->on_rq);
+ WARN_ON_ONCE_DEFERRED(owner && !owner->on_rq);
return owner;
deactivate:
@@ -7631,8 +7631,8 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
* real need to boost.
*/
if (unlikely(p == rq->idle)) {
- WARN_ON(p != rq->curr);
- WARN_ON(p->pi_blocked_on);
+ WARN_ON_DEFERRED(p != rq->curr);
+ WARN_ON_DEFERRED(p->pi_blocked_on);
goto out_unlock;
}
@@ -8463,7 +8463,7 @@ static void balance_push_set(int cpu, bool on)
rq_lock_irqsave(rq, &rf);
if (on) {
- WARN_ON_ONCE(rq->balance_callback);
+ WARN_ON_ONCE_DEFERRED(rq->balance_callback);
rq->balance_callback = &balance_push_callback;
} else if (rq->balance_callback == &balance_push_callback) {
rq->balance_callback = NULL;
@@ -11150,7 +11150,7 @@ struct sched_change_ctx *sched_change_begin(struct task_struct *p, unsigned int
* Must exclusively use matched flags since this is both dequeue and
* enqueue.
*/
- WARN_ON_ONCE(flags & 0xFFFF0000);
+ WARN_ON_ONCE_DEFERRED(flags & 0xFFFF0000);
lockdep_assert_rq_held(rq);
@@ -11198,7 +11198,7 @@ void sched_change_end(struct sched_change_ctx *ctx)
/*
* Changing class without *QUEUE_CLASS is bad.
*/
- WARN_ON_ONCE(p->sched_class != ctx->class && !(ctx->flags & ENQUEUE_CLASS));
+ WARN_ON_ONCE_DEFERRED(p->sched_class != ctx->class && !(ctx->flags & ENQUEUE_CLASS));
if ((ctx->flags & ENQUEUE_CLASS) && p->sched_class->switching_to)
p->sched_class->switching_to(rq, p);
diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
index 73b6b24269119b..ec88ed7d8ee877 100644
--- a/kernel/sched/core_sched.c
+++ b/kernel/sched/core_sched.c
@@ -67,7 +67,7 @@ static unsigned long sched_core_update_cookie(struct task_struct *p,
* a cookie until after we've removed it, we must have core scheduling
* enabled here.
*/
- WARN_ON_ONCE((p->core_cookie || cookie) && !sched_core_enabled(rq));
+ WARN_ON_ONCE_DEFERRED((p->core_cookie || cookie) && !sched_core_enabled(rq));
if (sched_core_enqueued(p))
sched_core_dequeue(rq, p, DEQUEUE_SAVE);
@@ -249,7 +249,7 @@ void __sched_core_account_forceidle(struct rq *rq)
lockdep_assert_rq_held(rq);
- WARN_ON_ONCE(!rq->core->core_forceidle_count);
+ WARN_ON_ONCE_DEFERRED(!rq->core->core_forceidle_count);
if (rq->core->core_forceidle_start == 0)
return;
@@ -260,7 +260,7 @@ void __sched_core_account_forceidle(struct rq *rq)
rq->core->core_forceidle_start = now;
- if (WARN_ON_ONCE(!rq->core->core_forceidle_occupation)) {
+ if (WARN_ON_ONCE_DEFERRED(!rq->core->core_forceidle_occupation)) {
/* can't be forced idle without a running task */
} else if (rq->core->core_forceidle_count > 1 ||
rq->core->core_forceidle_occupation > 1) {
diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
index 0a2b7e30fd10c1..e305a8e993e27c 100644
--- a/kernel/sched/cpudeadline.c
+++ b/kernel/sched/cpudeadline.c
@@ -149,7 +149,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,
} else {
int best_cpu = cpudl_maximum(cp);
- WARN_ON(best_cpu != -1 && !cpu_present(best_cpu));
+ WARN_ON_DEFERRED(best_cpu != -1 && !cpu_present(best_cpu));
if (cpumask_test_cpu(best_cpu, &p->cpus_mask) &&
dl_time_before(dl_se->deadline, cp->elements[0].dl)) {
@@ -177,7 +177,7 @@ void cpudl_clear(struct cpudl *cp, int cpu, bool online)
int old_idx, new_cpu;
unsigned long flags;
- WARN_ON(!cpu_present(cpu));
+ WARN_ON_DEFERRED(!cpu_present(cpu));
raw_spin_lock_irqsave(&cp->lock, flags);
@@ -220,7 +220,7 @@ void cpudl_set(struct cpudl *cp, int cpu, u64 dl)
int old_idx;
unsigned long flags;
- WARN_ON(!cpu_present(cpu));
+ WARN_ON_DEFERRED(!cpu_present(cpu));
raw_spin_lock_irqsave(&cp->lock, flags);
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 7db4c87df83b0a..863ac7509192f7 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -217,8 +217,8 @@ void __add_running_bw(u64 dl_bw, struct dl_rq *dl_rq)
lockdep_assert_rq_held(rq_of_dl_rq(dl_rq));
dl_rq->running_bw += dl_bw;
- WARN_ON_ONCE(dl_rq->running_bw < old); /* overflow */
- WARN_ON_ONCE(dl_rq->running_bw > dl_rq->this_bw);
+ WARN_ON_ONCE_DEFERRED(dl_rq->running_bw < old); /* overflow */
+ WARN_ON_ONCE_DEFERRED(dl_rq->running_bw > dl_rq->this_bw);
/* kick cpufreq (see the comment in kernel/sched/sched.h). */
cpufreq_update_util(rq_of_dl_rq(dl_rq), 0);
}
@@ -230,7 +230,7 @@ void __sub_running_bw(u64 dl_bw, struct dl_rq *dl_rq)
lockdep_assert_rq_held(rq_of_dl_rq(dl_rq));
dl_rq->running_bw -= dl_bw;
- WARN_ON_ONCE(dl_rq->running_bw > old); /* underflow */
+ WARN_ON_ONCE_DEFERRED(dl_rq->running_bw > old); /* underflow */
if (dl_rq->running_bw > old)
dl_rq->running_bw = 0;
/* kick cpufreq (see the comment in kernel/sched/sched.h). */
@@ -244,7 +244,7 @@ void __add_rq_bw(u64 dl_bw, struct dl_rq *dl_rq)
lockdep_assert_rq_held(rq_of_dl_rq(dl_rq));
dl_rq->this_bw += dl_bw;
- WARN_ON_ONCE(dl_rq->this_bw < old); /* overflow */
+ WARN_ON_ONCE_DEFERRED(dl_rq->this_bw < old); /* overflow */
}
static inline
@@ -254,10 +254,10 @@ void __sub_rq_bw(u64 dl_bw, struct dl_rq *dl_rq)
lockdep_assert_rq_held(rq_of_dl_rq(dl_rq));
dl_rq->this_bw -= dl_bw;
- WARN_ON_ONCE(dl_rq->this_bw > old); /* underflow */
+ WARN_ON_ONCE_DEFERRED(dl_rq->this_bw > old); /* underflow */
if (dl_rq->this_bw > old)
dl_rq->this_bw = 0;
- WARN_ON_ONCE(dl_rq->running_bw > dl_rq->this_bw);
+ WARN_ON_ONCE_DEFERRED(dl_rq->running_bw > dl_rq->this_bw);
}
static inline
@@ -335,7 +335,7 @@ void cancel_inactive_timer(struct sched_dl_entity *dl_se)
static void dl_change_utilization(struct task_struct *p, u64 new_bw)
{
- WARN_ON_ONCE(p->dl.flags & SCHED_FLAG_SUGOV);
+ WARN_ON_ONCE_DEFERRED(p->dl.flags & SCHED_FLAG_SUGOV);
if (task_on_rq_queued(p))
return;
@@ -416,7 +416,7 @@ static void task_non_contending(struct sched_dl_entity *dl_se, bool dl_task)
if (dl_entity_is_special(dl_se))
return;
- WARN_ON(dl_se->dl_non_contending);
+ WARN_ON_DEFERRED(dl_se->dl_non_contending);
zerolag_time = dl_se->deadline -
div64_long((dl_se->runtime * dl_se->dl_period),
@@ -582,7 +582,7 @@ static void enqueue_pushable_dl_task(struct rq *rq, struct task_struct *p)
{
struct rb_node *leftmost;
- WARN_ON_ONCE(!RB_EMPTY_NODE(&p->pushable_dl_tasks));
+ WARN_ON_ONCE_DEFERRED(!RB_EMPTY_NODE(&p->pushable_dl_tasks));
leftmost = rb_add_cached(&p->pushable_dl_tasks,
&rq->dl.pushable_dl_tasks_root,
@@ -664,7 +664,7 @@ static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p
* Failed to find any suitable CPU.
* The task will never come back!
*/
- WARN_ON_ONCE(dl_bandwidth_enabled());
+ WARN_ON_ONCE_DEFERRED(dl_bandwidth_enabled());
/*
* If admission control is disabled we
@@ -756,8 +756,8 @@ static inline void setup_new_dl_entity(struct sched_dl_entity *dl_se)
struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
struct rq *rq = rq_of_dl_rq(dl_rq);
- WARN_ON(is_dl_boosted(dl_se));
- WARN_ON(dl_time_before(rq_clock(rq), dl_se->deadline));
+ WARN_ON_DEFERRED(is_dl_boosted(dl_se));
+ WARN_ON_DEFERRED(dl_time_before(rq_clock(rq), dl_se->deadline));
/*
* We are racing with the deadline timer. So, do nothing because
@@ -801,7 +801,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se)
struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
struct rq *rq = rq_of_dl_rq(dl_rq);
- WARN_ON_ONCE(pi_of(dl_se)->dl_runtime <= 0);
+ WARN_ON_ONCE_DEFERRED(pi_of(dl_se)->dl_runtime <= 0);
/*
* This could be the case for a !-dl task that is boosted.
@@ -975,7 +975,7 @@ update_dl_revised_wakeup(struct sched_dl_entity *dl_se, struct rq *rq)
*
* See update_dl_entity() comments for further details.
*/
- WARN_ON(dl_time_before(dl_se->deadline, rq_clock(rq)));
+ WARN_ON_DEFERRED(dl_time_before(dl_se->deadline, rq_clock(rq)));
dl_se->runtime = (dl_se->dl_density * laxity) >> BW_SHIFT;
}
@@ -1080,7 +1080,7 @@ static int start_dl_timer(struct sched_dl_entity *dl_se)
* (current u > U).
*/
if (dl_se->dl_defer_armed) {
- WARN_ON_ONCE(!dl_se->dl_throttled);
+ WARN_ON_ONCE_DEFERRED(!dl_se->dl_throttled);
act = ns_to_ktime(dl_se->deadline - dl_se->runtime);
} else {
/* act = deadline - rel-deadline + period */
@@ -1451,7 +1451,7 @@ static void update_curr_dl_se(struct rq *rq, struct sched_dl_entity *dl_se, s64
/*
* Non-servers would never get time accounted while throttled.
*/
- WARN_ON_ONCE(!dl_server(dl_se));
+ WARN_ON_ONCE_DEFERRED(!dl_server(dl_se));
/*
* While the server is marked idle, do not push out the
@@ -1492,7 +1492,7 @@ static void update_curr_dl_se(struct rq *rq, struct sched_dl_entity *dl_se, s64
* and queue right away. Otherwise nothing might queue it. That's similar
* to what enqueue_dl_entity() does on start_dl_timer==0. For now, just warn.
*/
- WARN_ON_ONCE(!start_dl_timer(dl_se));
+ WARN_ON_ONCE_DEFERRED(!start_dl_timer(dl_se));
return;
}
@@ -1801,7 +1801,7 @@ void dl_server_start(struct sched_dl_entity *dl_se)
*/
rq->donor->sched_class->update_curr(rq);
- if (WARN_ON_ONCE(!cpu_online(cpu_of(rq))))
+ if (WARN_ON_ONCE_DEFERRED(!cpu_online(cpu_of(rq))))
return;
trace_sched_dl_server_start_tp(dl_se, cpu_of(rq), dl_get_type(dl_se, rq));
@@ -2073,7 +2073,7 @@ void inc_dl_tasks(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
static inline
void dec_dl_tasks(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
{
- WARN_ON(!dl_rq->dl_nr_running);
+ WARN_ON_DEFERRED(!dl_rq->dl_nr_running);
dl_rq->dl_nr_running--;
if (!dl_server(dl_se))
@@ -2165,7 +2165,7 @@ static void __enqueue_dl_entity(struct sched_dl_entity *dl_se)
{
struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
- WARN_ON_ONCE(!RB_EMPTY_NODE(&dl_se->rb_node));
+ WARN_ON_ONCE_DEFERRED(!RB_EMPTY_NODE(&dl_se->rb_node));
rb_add_cached(&dl_se->rb_node, &dl_rq->root, __dl_less);
@@ -2189,7 +2189,7 @@ static void __dequeue_dl_entity(struct sched_dl_entity *dl_se)
static void
enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags)
{
- WARN_ON_ONCE(on_dl_rq(dl_se));
+ WARN_ON_ONCE_DEFERRED(on_dl_rq(dl_se));
update_stats_enqueue_dl(dl_rq_of_se(dl_se), dl_se, flags);
@@ -2611,7 +2611,7 @@ static struct task_struct *__pick_task_dl(struct rq *rq, struct rq_flags *rf)
return NULL;
dl_se = pick_next_dl_entity(dl_rq);
- WARN_ON_ONCE(!dl_se);
+ WARN_ON_ONCE_DEFERRED(!dl_se);
if (dl_server(dl_se)) {
p = dl_se->server_pick_task(dl_se, rf);
@@ -2823,12 +2823,12 @@ static struct task_struct *pick_next_pushable_dl_task(struct rq *rq)
if (!p)
return NULL;
- WARN_ON_ONCE(rq->cpu != task_cpu(p));
- WARN_ON_ONCE(task_current(rq, p));
- WARN_ON_ONCE(p->nr_cpus_allowed <= 1);
+ WARN_ON_ONCE_DEFERRED(rq->cpu != task_cpu(p));
+ WARN_ON_ONCE_DEFERRED(task_current(rq, p));
+ WARN_ON_ONCE_DEFERRED(p->nr_cpus_allowed <= 1);
- WARN_ON_ONCE(!task_on_rq_queued(p));
- WARN_ON_ONCE(!dl_task(p));
+ WARN_ON_ONCE_DEFERRED(!task_on_rq_queued(p));
+ WARN_ON_ONCE_DEFERRED(!dl_task(p));
return p;
}
@@ -2944,7 +2944,7 @@ static int push_dl_task(struct rq *rq)
if (is_migration_disabled(next_task))
return 0;
- if (WARN_ON(next_task == rq->curr))
+ if (WARN_ON_DEFERRED(next_task == rq->curr))
return 0;
/* We might release rq lock */
@@ -3050,8 +3050,8 @@ static void pull_dl_task(struct rq *this_rq)
*/
if (p && dl_time_before(p->dl.deadline, dmin) &&
dl_task_is_earliest_deadline(p, this_rq)) {
- WARN_ON(p == src_rq->curr);
- WARN_ON(!task_on_rq_queued(p));
+ WARN_ON_DEFERRED(p == src_rq->curr);
+ WARN_ON_DEFERRED(!task_on_rq_queued(p));
/*
* Then we pull iff p has actually an earlier
@@ -3109,7 +3109,7 @@ static void set_cpus_allowed_dl(struct task_struct *p,
{
struct rq *rq;
- WARN_ON_ONCE(!dl_task(p));
+ WARN_ON_ONCE_DEFERRED(!dl_task(p));
rq = task_rq(p);
/*
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 5d2d19473a82e8..47d3a4c16455ac 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -512,12 +512,12 @@ do { \
* So if kf_tasks[] is set, @p's scheduler-protected fields are stable.
*
* kf_tasks[] can not stack, so task-based SCX ops must not nest. The
- * WARN_ON_ONCE() in each macro catches a re-entry of any of the three variants
- * while a previous one is still in progress.
+ * WARN_ON_ONCE_DEFERRED() in each macro catches a re-entry of any of the three
+ * variants while a previous one is still in progress.
*/
#define SCX_CALL_OP_TASK(sch, op, locked_rq, task, args...) \
do { \
- WARN_ON_ONCE(current->scx.kf_tasks[0]); \
+ WARN_ON_ONCE_DEFERRED(current->scx.kf_tasks[0]); \
current->scx.kf_tasks[0] = task; \
SCX_CALL_OP((sch), op, locked_rq, task, ##args); \
current->scx.kf_tasks[0] = NULL; \
@@ -526,7 +526,7 @@ do { \
#define SCX_CALL_OP_TASK_RET(sch, op, locked_rq, task, args...) \
({ \
__typeof__((sch)->ops.op(task, ##args)) __ret; \
- WARN_ON_ONCE(current->scx.kf_tasks[0]); \
+ WARN_ON_ONCE_DEFERRED(current->scx.kf_tasks[0]); \
current->scx.kf_tasks[0] = task; \
__ret = SCX_CALL_OP_RET((sch), op, locked_rq, task, ##args); \
current->scx.kf_tasks[0] = NULL; \
@@ -536,7 +536,7 @@ do { \
#define SCX_CALL_OP_2TASKS_RET(sch, op, locked_rq, task0, task1, args...) \
({ \
__typeof__((sch)->ops.op(task0, task1, ##args)) __ret; \
- WARN_ON_ONCE(current->scx.kf_tasks[0]); \
+ WARN_ON_ONCE_DEFERRED(current->scx.kf_tasks[0]); \
current->scx.kf_tasks[0] = task0; \
current->scx.kf_tasks[1] = task1; \
__ret = SCX_CALL_OP_RET((sch), op, locked_rq, task0, task1, ##args); \
@@ -687,7 +687,7 @@ static bool nldsq_cursor_lost_task(struct scx_dsq_list_node *cursor,
return true;
/* if @p has stayed on @dsq, its rq couldn't have changed */
- if (WARN_ON_ONCE(rq != task_rq(p)))
+ if (WARN_ON_ONCE_DEFERRED(rq != task_rq(p)))
return true;
return false;
@@ -1282,7 +1282,7 @@ static void schedule_reenq_local(struct rq *rq, u64 reenq_flags)
{
struct scx_sched *root = rcu_dereference_sched(scx_root);
- if (WARN_ON_ONCE(!root))
+ if (WARN_ON_ONCE_DEFERRED(!root))
return;
schedule_dsq_reenq(root, &rq->scx.local_dsq, reenq_flags, rq);
@@ -1379,7 +1379,7 @@ static void dsq_inc_nr(struct scx_dispatch_q *dsq, struct task_struct *p, u64 en
*/
if (enq_flags & SCX_ENQ_IMMED) {
if (unlikely(dsq->id != SCX_DSQ_LOCAL)) {
- WARN_ON_ONCE(!(enq_flags & SCX_ENQ_GDSQ_FALLBACK));
+ WARN_ON_ONCE_DEFERRED(!(enq_flags & SCX_ENQ_GDSQ_FALLBACK));
return;
}
p->scx.flags |= SCX_TASK_IMMED;
@@ -1388,7 +1388,7 @@ static void dsq_inc_nr(struct scx_dispatch_q *dsq, struct task_struct *p, u64 en
if (p->scx.flags & SCX_TASK_IMMED) {
struct rq *rq = container_of(dsq, struct rq, scx.local_dsq);
- if (WARN_ON_ONCE(dsq->id != SCX_DSQ_LOCAL))
+ if (WARN_ON_ONCE_DEFERRED(dsq->id != SCX_DSQ_LOCAL))
return;
rq->scx.nr_immed++;
@@ -1410,8 +1410,8 @@ static void dsq_dec_nr(struct scx_dispatch_q *dsq, struct task_struct *p)
if (p->scx.flags & SCX_TASK_IMMED) {
struct rq *rq = container_of(dsq, struct rq, scx.local_dsq);
- if (WARN_ON_ONCE(dsq->id != SCX_DSQ_LOCAL) ||
- WARN_ON_ONCE(rq->scx.nr_immed <= 0))
+ if (WARN_ON_ONCE_DEFERRED(dsq->id != SCX_DSQ_LOCAL) ||
+ WARN_ON_ONCE_DEFERRED(rq->scx.nr_immed <= 0))
return;
rq->scx.nr_immed--;
@@ -1521,9 +1521,9 @@ static void dispatch_enqueue(struct scx_sched *sch, struct rq *rq,
{
bool is_local = dsq->id == SCX_DSQ_LOCAL;
- WARN_ON_ONCE(p->scx.dsq || !list_empty(&p->scx.dsq_list.node));
- WARN_ON_ONCE((p->scx.dsq_flags & SCX_TASK_DSQ_ON_PRIQ) ||
- !RB_EMPTY_NODE(&p->scx.dsq_priq));
+ WARN_ON_ONCE_DEFERRED(p->scx.dsq || !list_empty(&p->scx.dsq_list.node));
+ WARN_ON_ONCE_DEFERRED((p->scx.dsq_flags & SCX_TASK_DSQ_ON_PRIQ) ||
+ !RB_EMPTY_NODE(&p->scx.dsq_priq));
if (!is_local) {
raw_spin_lock_nested(&dsq->lock,
@@ -1646,7 +1646,7 @@ static void dispatch_enqueue(struct scx_sched *sch, struct rq *rq,
static void task_unlink_from_dsq(struct task_struct *p,
struct scx_dispatch_q *dsq)
{
- WARN_ON_ONCE(list_empty(&p->scx.dsq_list.node));
+ WARN_ON_ONCE_DEFERRED(list_empty(&p->scx.dsq_list.node));
if (p->scx.dsq_flags & SCX_TASK_DSQ_ON_PRIQ) {
rb_erase(&p->scx.dsq_priq, &dsq->priq);
@@ -1709,7 +1709,7 @@ static void dispatch_dequeue(struct rq *rq, struct task_struct *p)
* holding_cpu which tells dispatch_to_local_dsq() that it lost
* the race.
*/
- WARN_ON_ONCE(!list_empty(&p->scx.dsq_list.node));
+ WARN_ON_ONCE_DEFERRED(!list_empty(&p->scx.dsq_list.node));
p->scx.holding_cpu = -1;
}
p->scx.dsq = NULL;
@@ -1787,8 +1787,8 @@ static void mark_direct_dispatch(struct scx_sched *sch,
return;
}
- WARN_ON_ONCE(p->scx.ddsp_dsq_id != SCX_DSQ_INVALID);
- WARN_ON_ONCE(p->scx.ddsp_enq_flags);
+ WARN_ON_ONCE_DEFERRED(p->scx.ddsp_dsq_id != SCX_DSQ_INVALID);
+ WARN_ON_ONCE_DEFERRED(p->scx.ddsp_enq_flags);
p->scx.ddsp_dsq_id = dsq_id;
p->scx.ddsp_enq_flags = enq_flags;
@@ -1855,7 +1855,7 @@ static void direct_dispatch(struct scx_sched *sch, struct task_struct *p,
break;
}
- WARN_ON_ONCE(p->scx.dsq || !list_empty(&p->scx.dsq_list.node));
+ WARN_ON_ONCE_DEFERRED(p->scx.dsq || !list_empty(&p->scx.dsq_list.node));
list_add_tail(&p->scx.dsq_list.node,
&rq->scx.ddsp_deferred_locals);
schedule_deferred_locked(rq);
@@ -1888,7 +1888,7 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,
struct scx_dispatch_q *dsq;
unsigned long qseq;
- WARN_ON_ONCE(!(p->scx.flags & SCX_TASK_QUEUED));
+ WARN_ON_ONCE_DEFERRED(!(p->scx.flags & SCX_TASK_QUEUED));
/* internal movements - rq migration / RESTORE */
if (sticky_cpu == cpu_of(rq))
@@ -1938,11 +1938,11 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,
/* DSQ bypass didn't trigger, enqueue on the BPF scheduler */
qseq = rq->scx.ops_qseq++ << SCX_OPSS_QSEQ_SHIFT;
- WARN_ON_ONCE(atomic_long_read(&p->scx.ops_state) != SCX_OPSS_NONE);
+ WARN_ON_ONCE_DEFERRED(atomic_long_read(&p->scx.ops_state) != SCX_OPSS_NONE);
atomic_long_set(&p->scx.ops_state, SCX_OPSS_QUEUEING | qseq);
ddsp_taskp = this_cpu_ptr(&direct_dispatch_task);
- WARN_ON_ONCE(*ddsp_taskp);
+ WARN_ON_ONCE_DEFERRED(*ddsp_taskp);
*ddsp_taskp = p;
SCX_CALL_OP_TASK(sch, enqueue, rq, p, enq_flags);
@@ -2039,7 +2039,7 @@ static void enqueue_task_scx(struct rq *rq, struct task_struct *p, int core_enq_
sticky_cpu = cpu_of(rq);
if (p->scx.flags & SCX_TASK_QUEUED) {
- WARN_ON_ONCE(!task_runnable(p));
+ WARN_ON_ONCE_DEFERRED(!task_runnable(p));
goto out;
}
@@ -2159,7 +2159,7 @@ static bool dequeue_task_scx(struct rq *rq, struct task_struct *p, int core_deq_
deq_flags |= SCX_DEQ_SCHED_CHANGE;
if (!(p->scx.flags & SCX_TASK_QUEUED)) {
- WARN_ON_ONCE(task_runnable(p));
+ WARN_ON_ONCE_DEFERRED(task_runnable(p));
return true;
}
@@ -2256,7 +2256,7 @@ static void move_local_task_to_local_dsq(struct scx_sched *sch,
lockdep_assert_held(&src_dsq->lock);
lockdep_assert_rq_held(dst_rq);
- WARN_ON_ONCE(p->scx.holding_cpu >= 0);
+ WARN_ON_ONCE_DEFERRED(p->scx.holding_cpu >= 0);
if (enq_flags & (SCX_ENQ_HEAD | SCX_ENQ_PREEMPT))
list_add(&p->scx.dsq_list.node, &dst_dsq->list);
@@ -2299,8 +2299,8 @@ static void move_remote_task_to_local_dsq(struct task_struct *p, u64 enq_flags,
* truncate the upper 32 bit. As we own @rq, we can pass them through
* @rq->scx.extra_enq_flags instead.
*/
- WARN_ON_ONCE(!cpumask_test_cpu(cpu_of(dst_rq), p->cpus_ptr));
- WARN_ON_ONCE(dst_rq->scx.extra_enq_flags);
+ WARN_ON_ONCE_DEFERRED(!cpumask_test_cpu(cpu_of(dst_rq), p->cpus_ptr));
+ WARN_ON_ONCE_DEFERRED(dst_rq->scx.extra_enq_flags);
dst_rq->scx.extra_enq_flags = enq_flags;
activate_task(dst_rq, p, 0);
dst_rq->scx.extra_enq_flags = 0;
@@ -2331,7 +2331,7 @@ static bool task_can_run_on_remote_rq(struct scx_sched *sch,
{
s32 cpu = cpu_of(rq);
- WARN_ON_ONCE(task_cpu(p) == cpu);
+ WARN_ON_ONCE_DEFERRED(task_cpu(p) == cpu);
/*
* If @p has migration disabled, @p->cpus_ptr is updated to contain only
@@ -2411,7 +2411,7 @@ static bool unlink_dsq_and_lock_src_rq(struct task_struct *p,
lockdep_assert_held(&dsq->lock);
- WARN_ON_ONCE(p->scx.holding_cpu >= 0);
+ WARN_ON_ONCE_DEFERRED(p->scx.holding_cpu >= 0);
task_unlink_from_dsq(p, dsq);
p->scx.holding_cpu = cpu;
@@ -2420,7 +2420,7 @@ static bool unlink_dsq_and_lock_src_rq(struct task_struct *p,
/* task_rq couldn't have changed if we're still the holding cpu */
return likely(p->scx.holding_cpu == cpu) &&
- !WARN_ON_ONCE(src_rq != task_rq(p));
+ !WARN_ON_ONCE_DEFERRED(src_rq != task_rq(p));
}
static bool consume_remote_task(struct rq *this_rq,
@@ -2630,7 +2630,7 @@ static void dispatch_to_local_dsq(struct scx_sched *sch, struct rq *rq,
/* task_rq couldn't have changed if we're still the holding cpu */
if (likely(p->scx.holding_cpu == raw_smp_processor_id()) &&
- !WARN_ON_ONCE(src_rq != task_rq(p))) {
+ !WARN_ON_ONCE_DEFERRED(src_rq != task_rq(p))) {
/*
* If @p is staying on the same rq, there's no need to go
* through the full deactivate/activate cycle. Optimize by
@@ -3099,7 +3099,7 @@ static void put_prev_task_scx(struct rq *rq, struct task_struct *p,
* which should trigger an explicit follow-up scheduling event.
*/
if (next && sched_class_above(&ext_sched_class, next->sched_class)) {
- WARN_ON_ONCE(!(sch->ops.flags & SCX_OPS_ENQ_LAST));
+ WARN_ON_ONCE_DEFERRED(!(sch->ops.flags & SCX_OPS_ENQ_LAST));
do_enqueue_task(rq, p, SCX_ENQ_LAST, -1);
} else {
do_enqueue_task(rq, p, 0, -1);
@@ -3201,7 +3201,7 @@ do_pick_task_scx(struct rq *rq, struct rq_flags *rf, bool force_scx)
keep_prev = rq->scx.flags & SCX_RQ_BAL_KEEP;
if (unlikely(keep_prev &&
prev->sched_class != &ext_sched_class)) {
- WARN_ON_ONCE(scx_enable_state() == SCX_ENABLED);
+ WARN_ON_ONCE_DEFERRED(scx_enable_state() == SCX_ENABLED);
keep_prev = false;
}
@@ -3332,7 +3332,7 @@ static int select_task_rq_scx(struct task_struct *p, int prev_cpu, int wake_flag
struct task_struct **ddsp_taskp;
ddsp_taskp = this_cpu_ptr(&direct_dispatch_task);
- WARN_ON_ONCE(*ddsp_taskp);
+ WARN_ON_ONCE_DEFERRED(*ddsp_taskp);
*ddsp_taskp = p;
this_rq()->scx.in_select_cpu = true;
@@ -3620,7 +3620,7 @@ static void __scx_enable_task(struct scx_sched *sch, struct task_struct *p)
* transitions are consistent, the flag should always be clear
* here.
*/
- WARN_ON_ONCE(p->scx.flags & SCX_TASK_IN_CUSTODY);
+ WARN_ON_ONCE_DEFERRED(p->scx.flags & SCX_TASK_IN_CUSTODY);
/*
* Set the weight before calling ops.enable() so that the scheduler
@@ -3651,7 +3651,7 @@ static void scx_disable_task(struct scx_sched *sch, struct task_struct *p)
struct rq *rq = task_rq(p);
lockdep_assert_rq_held(rq);
- WARN_ON_ONCE(scx_get_task_state(p) != SCX_TASK_ENABLED);
+ WARN_ON_ONCE_DEFERRED(scx_get_task_state(p) != SCX_TASK_ENABLED);
clear_direct_dispatch(p);
@@ -3664,7 +3664,7 @@ static void scx_disable_task(struct scx_sched *sch, struct task_struct *p)
* transitions are consistent, the flag should always be clear
* here.
*/
- WARN_ON_ONCE(p->scx.flags & SCX_TASK_IN_CUSTODY);
+ WARN_ON_ONCE_DEFERRED(p->scx.flags & SCX_TASK_IN_CUSTODY);
}
static void __scx_disable_and_exit_task(struct scx_sched *sch,
@@ -3689,7 +3689,7 @@ static void __scx_disable_and_exit_task(struct scx_sched *sch,
scx_disable_task(sch, p);
break;
default:
- WARN_ON_ONCE(true);
+ WARN_ON_ONCE_DEFERRED(true);
return;
}
@@ -3726,7 +3726,7 @@ static void scx_disable_and_exit_task(struct scx_sched *sch,
* path, so it's always clear when @p arrives here in %SCX_TASK_NONE.
*/
if (p->scx.flags & SCX_TASK_SUB_INIT) {
- if (!WARN_ON_ONCE(!scx_enabling_sub_sched))
+ if (!WARN_ON_ONCE_DEFERRED(!scx_enabling_sub_sched))
scx_sub_init_cancel_task(scx_enabling_sub_sched, p);
p->scx.flags &= ~SCX_TASK_SUB_INIT;
}
@@ -3818,7 +3818,7 @@ void scx_cancel_fork(struct task_struct *p)
struct rq_flags rf;
rq = task_rq_lock(p, &rf);
- WARN_ON_ONCE(scx_get_task_state(p) >= SCX_TASK_READY);
+ WARN_ON_ONCE_DEFERRED(scx_get_task_state(p) >= SCX_TASK_READY);
scx_disable_and_exit_task(scx_task_sched(p), p);
task_rq_unlock(rq, p, &rf);
}
@@ -3986,7 +3986,7 @@ static void process_ddsp_deferred_locals(struct rq *rq)
clear_direct_dispatch(p);
dsq = find_dsq_for_dispatch(sch, rq, dsq_id, task_cpu(p));
- if (!WARN_ON_ONCE(dsq->id != SCX_DSQ_LOCAL))
+ if (!WARN_ON_ONCE_DEFERRED(dsq->id != SCX_DSQ_LOCAL))
dispatch_to_local_dsq(sch, rq, dsq, p, enq_flags);
}
}
@@ -4041,7 +4041,7 @@ static u32 reenq_local(struct scx_sched *sch, struct rq *rq, u64 reenq_flags)
lockdep_assert_rq_held(rq);
- if (WARN_ON_ONCE(reenq_flags & __SCX_REENQ_TSR_MASK))
+ if (WARN_ON_ONCE_DEFERRED(reenq_flags & __SCX_REENQ_TSR_MASK))
reenq_flags &= ~__SCX_REENQ_TSR_MASK;
if (rq_is_open(rq, 0))
reenq_flags |= SCX_REENQ_TSR_RQ_OPEN;
@@ -4078,7 +4078,7 @@ static u32 reenq_local(struct scx_sched *sch, struct rq *rq, u64 reenq_flags)
dispatch_dequeue(rq, p);
- if (WARN_ON_ONCE(p->scx.flags & SCX_TASK_REENQ_REASON_MASK))
+ if (WARN_ON_ONCE_DEFERRED(p->scx.flags & SCX_TASK_REENQ_REASON_MASK))
p->scx.flags &= ~SCX_TASK_REENQ_REASON_MASK;
p->scx.flags |= reason;
@@ -4199,7 +4199,7 @@ static void reenq_user(struct rq *rq, struct scx_dispatch_q *dsq, u64 reenq_flag
dispatch_dequeue_locked(p, dsq);
raw_spin_unlock(&dsq->lock);
- if (WARN_ON_ONCE(p->scx.flags & SCX_TASK_REENQ_REASON_MASK))
+ if (WARN_ON_ONCE_DEFERRED(p->scx.flags & SCX_TASK_REENQ_REASON_MASK))
p->scx.flags &= ~SCX_TASK_REENQ_REASON_MASK;
p->scx.flags |= reason;
@@ -4360,7 +4360,7 @@ int scx_cgroup_can_attach(struct cgroup_taskset *tset)
struct cgroup *from = tg_cgrp(task_group(p));
struct cgroup *to = tg_cgrp(css_tg(css));
- WARN_ON_ONCE(p->scx.cgrp_moving_from);
+ WARN_ON_ONCE_DEFERRED(p->scx.cgrp_moving_from);
/*
* sched_move_task() omits identity migrations. Let's match the
@@ -4617,7 +4617,7 @@ static void exit_dsq(struct scx_dispatch_q *dsq)
* There must have been a RCU grace period since the last
* insertion and @dsq should be off the deferred list by now.
*/
- if (WARN_ON_ONCE(!list_empty(&dru->node))) {
+ if (WARN_ON_ONCE_DEFERRED(!list_empty(&dru->node))) {
guard(raw_spinlock_irqsave)(&rq->scx.deferred_reenq_lock);
list_del_init(&dru->node);
}
@@ -4745,7 +4745,7 @@ static int scx_cgroup_init(struct scx_sched *sch)
tg->scx.flags |= SCX_TG_INITED;
}
- WARN_ON_ONCE(scx_cgroup_enabled);
+ WARN_ON_ONCE_DEFERRED(scx_cgroup_enabled);
scx_cgroup_enabled = true;
return 0;
@@ -4848,7 +4848,7 @@ static void scx_sched_free_rcu_work(struct work_struct *work)
* period. As that blocks new deferrals, all
* deferred_reenq_local_node's must be off-list by now.
*/
- WARN_ON_ONCE(!list_empty(&pcpu->deferred_reenq_local.node));
+ WARN_ON_ONCE_DEFERRED(!list_empty(&pcpu->deferred_reenq_local.node));
exit_dsq(bypass_dsq(sch, cpu));
}
@@ -5324,7 +5324,7 @@ static bool inc_bypass_depth(struct scx_sched *sch)
{
lockdep_assert_held(&scx_bypass_lock);
- WARN_ON_ONCE(sch->bypass_depth < 0);
+ WARN_ON_ONCE_DEFERRED(sch->bypass_depth < 0);
WRITE_ONCE(sch->bypass_depth, sch->bypass_depth + 1);
if (sch->bypass_depth != 1)
return false;
@@ -5339,7 +5339,7 @@ static bool dec_bypass_depth(struct scx_sched *sch)
{
lockdep_assert_held(&scx_bypass_lock);
- WARN_ON_ONCE(sch->bypass_depth < 1);
+ WARN_ON_ONCE_DEFERRED(sch->bypass_depth < 1);
WRITE_ONCE(sch->bypass_depth, sch->bypass_depth - 1);
if (sch->bypass_depth != 0)
return false;
@@ -5360,7 +5360,7 @@ static void enable_bypass_dsp(struct scx_sched *sch)
* @sch->bypass_depth transitioning from 0 to 1 triggers enabling.
* Shouldn't stagger.
*/
- if (WARN_ON_ONCE(test_and_set_bit(0, &sch->bypass_dsp_claim)))
+ if (WARN_ON_ONCE_DEFERRED(test_and_set_bit(0, &sch->bypass_dsp_claim)))
return;
/*
@@ -5380,11 +5380,11 @@ static void enable_bypass_dsp(struct scx_sched *sch)
* Bump enable depth on both @sch and bypass dispatch host.
*/
ret = atomic_inc_return(&sch->bypass_dsp_enable_depth);
- WARN_ON_ONCE(ret <= 0);
+ WARN_ON_ONCE_DEFERRED(ret <= 0);
if (host != sch) {
ret = atomic_inc_return(&host->bypass_dsp_enable_depth);
- WARN_ON_ONCE(ret <= 0);
+ WARN_ON_ONCE_DEFERRED(ret <= 0);
}
/*
@@ -5405,11 +5405,11 @@ static void disable_bypass_dsp(struct scx_sched *sch)
return;
ret = atomic_dec_return(&sch->bypass_dsp_enable_depth);
- WARN_ON_ONCE(ret < 0);
+ WARN_ON_ONCE_DEFERRED(ret < 0);
if (scx_parent(sch)) {
ret = atomic_dec_return(&scx_parent(sch)->bypass_dsp_enable_depth);
- WARN_ON_ONCE(ret < 0);
+ WARN_ON_ONCE_DEFERRED(ret < 0);
}
}
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 3ebec186f98236..1213e77665fe93 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -404,7 +404,7 @@ static inline void list_del_leaf_cfs_rq(struct cfs_rq *cfs_rq)
static inline void assert_list_leaf_cfs_rq(struct rq *rq)
{
- WARN_ON_ONCE(rq->tmp_alone_branch != &rq->leaf_cfs_rq_list);
+ WARN_ON_ONCE_DEFERRED(rq->tmp_alone_branch != &rq->leaf_cfs_rq_list);
}
/* Iterate through all leaf cfs_rq's on a runqueue */
@@ -689,7 +689,7 @@ __sum_w_vruntime_add(struct cfs_rq *cfs_rq, struct sched_entity *se)
s64 w_vruntime, key = entity_key(cfs_rq, se);
w_vruntime = key * weight;
- WARN_ON_ONCE((w_vruntime >> 63) != (w_vruntime >> 62));
+ WARN_ON_ONCE_DEFERRED((w_vruntime >> 63) != (w_vruntime >> 62));
cfs_rq->sum_w_vruntime += w_vruntime;
cfs_rq->sum_weight += weight;
@@ -861,7 +861,7 @@ bool update_entity_lag(struct cfs_rq *cfs_rq, struct sched_entity *se)
u64 avruntime = avg_vruntime(cfs_rq);
s64 vlag = entity_lag(cfs_rq, se, avruntime);
- WARN_ON_ONCE(!se->on_rq);
+ WARN_ON_ONCE_DEFERRED(!se->on_rq);
if (se->sched_delayed) {
/* previous vlag < 0 otherwise se would not be delayed */
@@ -1153,7 +1153,7 @@ static struct sched_entity *pick_eevdf(struct cfs_rq *cfs_rq, bool protect)
if (sched_feat(PICK_BUDDY) && protect &&
cfs_rq->next && entity_eligible(cfs_rq, cfs_rq->next)) {
/* ->next will never be delayed */
- WARN_ON_ONCE(cfs_rq->next->sched_delayed);
+ WARN_ON_ONCE_DEFERRED(cfs_rq->next->sched_delayed);
return cfs_rq->next;
}
@@ -4302,9 +4302,9 @@ static inline bool load_avg_is_decayed(struct sched_avg *sa)
* Make sure that rounding and/or propagation of PELT values never
* break this.
*/
- WARN_ON_ONCE(sa->load_avg ||
- sa->util_avg ||
- sa->runnable_avg);
+ WARN_ON_ONCE_DEFERRED(sa->load_avg ||
+ sa->util_avg ||
+ sa->runnable_avg);
return true;
}
@@ -5460,7 +5460,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
weight = avg_vruntime_weight(cfs_rq, se->load.weight);
lag *= load + weight;
- if (WARN_ON_ONCE(!load))
+ if (WARN_ON_ONCE_DEFERRED(!load))
load = 1;
lag = div64_long(lag, load);
@@ -5653,7 +5653,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
clear_buddies(cfs_rq, se);
if (flags & DEQUEUE_DELAYED) {
- WARN_ON_ONCE(!se->sched_delayed);
+ WARN_ON_ONCE_DEFERRED(!se->sched_delayed);
} else {
bool delay = sleep;
/*
@@ -5663,7 +5663,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
if (flags & (DEQUEUE_SPECIAL | DEQUEUE_THROTTLE))
delay = false;
- WARN_ON_ONCE(delay && se->sched_delayed);
+ WARN_ON_ONCE_DEFERRED(delay && se->sched_delayed);
if (sched_feat(DELAY_DEQUEUE) && delay &&
!entity_eligible(cfs_rq, se)) {
@@ -5747,7 +5747,7 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, bool first)
}
update_stats_curr_start(cfs_rq, se);
- WARN_ON_ONCE(cfs_rq->curr);
+ WARN_ON_ONCE_DEFERRED(cfs_rq->curr);
cfs_rq->curr = se;
/*
@@ -5814,7 +5814,7 @@ static void put_prev_entity(struct cfs_rq *cfs_rq, struct sched_entity *prev)
/* in !on_rq case, update occurred at dequeue */
update_load_avg(cfs_rq, prev, 0);
}
- WARN_ON_ONCE(cfs_rq->curr != prev);
+ WARN_ON_ONCE_DEFERRED(cfs_rq->curr != prev);
cfs_rq->curr = NULL;
}
@@ -6015,7 +6015,7 @@ static void throttle_cfs_rq_work(struct callback_head *work)
struct cfs_rq *cfs_rq;
struct rq *rq;
- WARN_ON_ONCE(p != current);
+ WARN_ON_ONCE_DEFERRED(p != current);
p->sched_throttle_work.next = &p->sched_throttle_work;
/*
@@ -6041,7 +6041,7 @@ static void throttle_cfs_rq_work(struct callback_head *work)
return;
rq = scope.rq;
update_rq_clock(rq);
- WARN_ON_ONCE(p->throttled || !list_empty(&p->throttle_node));
+ WARN_ON_ONCE_DEFERRED(p->throttled || !list_empty(&p->throttle_node));
dequeue_task_fair(rq, p, DEQUEUE_SLEEP | DEQUEUE_THROTTLE);
list_add(&p->throttle_node, &cfs_rq->throttled_limbo_list);
/*
@@ -6072,7 +6072,7 @@ void init_cfs_throttle_work(struct task_struct *p)
static void detach_task_cfs_rq(struct task_struct *p);
static void dequeue_throttled_task(struct task_struct *p, int flags)
{
- WARN_ON_ONCE(p->se.on_rq);
+ WARN_ON_ONCE_DEFERRED(p->se.on_rq);
list_del_init(&p->throttle_node);
/* task blocked after throttled */
@@ -6094,7 +6094,7 @@ static bool enqueue_throttled_task(struct task_struct *p)
struct cfs_rq *cfs_rq = cfs_rq_of(&p->se);
/* @p should have gone through dequeue_throttled_task() first */
- WARN_ON_ONCE(!list_empty(&p->throttle_node));
+ WARN_ON_ONCE_DEFERRED(!list_empty(&p->throttle_node));
/*
* If the throttled task @p is enqueued to a throttled cfs_rq,
@@ -6162,7 +6162,7 @@ static int tg_unthrottle_up(struct task_group *tg, void *data)
cfs_rq->throttled_clock_self = 0;
- if (WARN_ON_ONCE((s64)delta < 0))
+ if (WARN_ON_ONCE_DEFERRED((s64)delta < 0))
delta = 0;
cfs_rq->throttled_clock_self_time += delta;
@@ -6231,8 +6231,8 @@ static int tg_throttle_down(struct task_group *tg, void *data)
cfs_rq->pelt_clock_throttled = 1;
}
- WARN_ON_ONCE(cfs_rq->throttled_clock_self);
- WARN_ON_ONCE(!list_empty(&cfs_rq->throttled_limbo_list));
+ WARN_ON_ONCE_DEFERRED(cfs_rq->throttled_clock_self);
+ WARN_ON_ONCE_DEFERRED(!list_empty(&cfs_rq->throttled_limbo_list));
return 0;
}
@@ -6273,7 +6273,7 @@ static bool throttle_cfs_rq(struct cfs_rq *cfs_rq)
* throttled-list. rq->lock protects completion.
*/
cfs_rq->throttled = 1;
- WARN_ON_ONCE(cfs_rq->throttled_clock);
+ WARN_ON_ONCE_DEFERRED(cfs_rq->throttled_clock);
return true;
}
@@ -6380,7 +6380,7 @@ static inline void __unthrottle_cfs_rq_async(struct cfs_rq *cfs_rq)
}
/* Already enqueued */
- if (WARN_ON_ONCE(!list_empty(&cfs_rq->throttled_csd_list)))
+ if (WARN_ON_ONCE_DEFERRED(!list_empty(&cfs_rq->throttled_csd_list)))
return;
first = list_empty(&rq->cfsb_csd_list);
@@ -6393,7 +6393,7 @@ static void unthrottle_cfs_rq_async(struct cfs_rq *cfs_rq)
{
lockdep_assert_rq_held(rq_of(cfs_rq));
- if (WARN_ON_ONCE(!cfs_rq_throttled(cfs_rq) ||
+ if (WARN_ON_ONCE_DEFERRED(!cfs_rq_throttled(cfs_rq) ||
cfs_rq->runtime_remaining <= 0))
return;
@@ -6429,7 +6429,7 @@ static bool distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)
goto next;
/* By the above checks, this should never be true */
- WARN_ON_ONCE(cfs_rq->runtime_remaining > 0);
+ WARN_ON_ONCE_DEFERRED(cfs_rq->runtime_remaining > 0);
raw_spin_lock(&cfs_b->lock);
runtime = -cfs_rq->runtime_remaining + 1;
@@ -6450,7 +6450,7 @@ static bool distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)
* We currently only expect to be unthrottling
* a single cfs_rq locally.
*/
- WARN_ON_ONCE(!list_empty(&local_unthrottle));
+ WARN_ON_ONCE_DEFERRED(!list_empty(&local_unthrottle));
list_add_tail(&cfs_rq->throttled_csd_list,
&local_unthrottle);
}
@@ -6475,7 +6475,7 @@ static bool distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)
rq_unlock_irqrestore(rq, &rf);
}
- WARN_ON_ONCE(!list_empty(&local_unthrottle));
+ WARN_ON_ONCE_DEFERRED(!list_empty(&local_unthrottle));
rcu_read_unlock();
@@ -7048,7 +7048,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p)
u64 vdelta;
u64 delta;
- WARN_ON_ONCE(task_rq(p) != rq);
+ WARN_ON_ONCE_DEFERRED(task_rq(p) != rq);
if (rq->cfs.h_nr_queued <= 1)
return;
@@ -7171,8 +7171,8 @@ requeue_delayed_entity(struct sched_entity *se)
* Because a delayed entity is one that is still on
* the runqueue competing until elegibility.
*/
- WARN_ON_ONCE(!se->sched_delayed);
- WARN_ON_ONCE(!se->on_rq);
+ WARN_ON_ONCE_DEFERRED(!se->sched_delayed);
+ WARN_ON_ONCE_DEFERRED(!se->on_rq);
if (update_entity_lag(cfs_rq, se)) {
cfs_rq->nr_queued--;
@@ -7409,8 +7409,8 @@ static int dequeue_entities(struct rq *rq, struct sched_entity *se, int flags)
rq->next_balance = jiffies;
if (p && task_delayed) {
- WARN_ON_ONCE(!task_sleep);
- WARN_ON_ONCE(p->on_rq != 1);
+ WARN_ON_ONCE_DEFERRED(!task_sleep);
+ WARN_ON_ONCE_DEFERRED(p->on_rq != 1);
/*
* Fix-up what block_task() skipped.
@@ -8976,7 +8976,7 @@ static void set_cpus_allowed_fair(struct task_struct *p, struct affinity_context
static void set_next_buddy(struct sched_entity *se)
{
for_each_sched_entity(se) {
- if (WARN_ON_ONCE(!se->on_rq))
+ if (WARN_ON_ONCE_DEFERRED(!se->on_rq))
return;
if (se_is_idle(se))
return;
@@ -9023,7 +9023,7 @@ preempt_sync(struct rq *rq, int wake_flags,
* WF_SYNC without WF_TTWU is not expected so warn if it happens even
* though it is likely harmless.
*/
- WARN_ON_ONCE(!(wake_flags & WF_TTWU));
+ WARN_ON_ONCE_DEFERRED(!(wake_flags & WF_TTWU));
threshold = sysctl_sched_migration_cost;
delta = rq_clock_task(rq) - se->exec_start;
@@ -9095,7 +9095,7 @@ static void wakeup_preempt_fair(struct rq *rq, struct task_struct *p, int wake_f
return;
find_matching_se(&se, &pse);
- WARN_ON_ONCE(!pse);
+ WARN_ON_ONCE_DEFERRED(!pse);
cse_is_idle = se_is_idle(se);
pse_is_idle = se_is_idle(pse);
@@ -9857,8 +9857,8 @@ static void detach_task(struct task_struct *p, struct lb_env *env)
schedstat_inc(p->stats.nr_forced_migrations);
}
- WARN_ON(task_current(env->src_rq, p));
- WARN_ON(task_current_donor(env->src_rq, p));
+ WARN_ON_DEFERRED(task_current(env->src_rq, p));
+ WARN_ON_DEFERRED(task_current_donor(env->src_rq, p));
deactivate_task(env->src_rq, p, DEQUEUE_NOCLOCK);
set_task_cpu(p, env->dst_cpu);
@@ -12151,7 +12151,7 @@ static int sched_balance_rq(int this_cpu, struct rq *this_rq,
goto out_balanced;
}
- WARN_ON_ONCE(busiest == env.dst_rq);
+ WARN_ON_ONCE_DEFERRED(busiest == env.dst_rq);
update_lb_imbalance_stat(&env, sd, idle);
@@ -12461,7 +12461,7 @@ static int active_load_balance_cpu_stop(void *data)
* we need to fix it. Originally reported by
* Bjorn Helgaas on a 128-CPU setup.
*/
- WARN_ON_ONCE(busiest_rq == target_rq);
+ WARN_ON_ONCE_DEFERRED(busiest_rq == target_rq);
/* Search for an sd spanning us and the target CPU. */
rcu_read_lock();
@@ -12883,7 +12883,7 @@ static void set_cpu_sd_state_busy(int cpu)
void nohz_balance_exit_idle(struct rq *rq)
{
- WARN_ON_ONCE(rq != this_rq());
+ WARN_ON_ONCE_DEFERRED(rq != this_rq());
if (likely(!rq->nohz_tick_stopped))
return;
@@ -12918,7 +12918,7 @@ void nohz_balance_enter_idle(int cpu)
{
struct rq *rq = cpu_rq(cpu);
- WARN_ON_ONCE(cpu != smp_processor_id());
+ WARN_ON_ONCE_DEFERRED(cpu != smp_processor_id());
/* If this CPU is going down, then nothing needs to be done: */
if (!cpu_active(cpu))
@@ -13000,7 +13000,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags)
int balance_cpu;
struct rq *rq;
- WARN_ON_ONCE((flags & NOHZ_KICK_MASK) == NOHZ_BALANCE_KICK);
+ WARN_ON_ONCE_DEFERRED((flags & NOHZ_KICK_MASK) == NOHZ_BALANCE_KICK);
/*
* We assume there will be no idle load after this update and clear
@@ -13623,7 +13623,7 @@ bool cfs_prio_less(const struct task_struct *a, const struct task_struct *b,
struct cfs_rq *cfs_rqb;
s64 delta;
- WARN_ON_ONCE(task_rq(b)->core != rq->core);
+ WARN_ON_ONCE_DEFERRED(task_rq(b)->core != rq->core);
#ifdef CONFIG_FAIR_GROUP_SCHED
/*
@@ -13839,7 +13839,7 @@ static void switched_from_fair(struct rq *rq, struct task_struct *p)
static void switched_to_fair(struct rq *rq, struct task_struct *p)
{
- WARN_ON_ONCE(p->se.sched_delayed);
+ WARN_ON_ONCE_DEFERRED(p->se.sched_delayed);
attach_task_cfs_rq(p);
@@ -13872,7 +13872,7 @@ static void __set_next_task_fair(struct rq *rq, struct task_struct *p, bool firs
if (!first)
return;
- WARN_ON_ONCE(se->sched_delayed);
+ WARN_ON_ONCE_DEFERRED(se->sched_delayed);
if (hrtick_enabled_fair(rq))
hrtick_start_fair(rq, p);
@@ -14148,7 +14148,7 @@ int sched_group_set_idle(struct task_group *tg, long idle)
rq_lock_irqsave(rq, &rf);
grp_cfs_rq->idle = idle;
- if (WARN_ON_ONCE(was_idle == cfs_rq_is_idle(grp_cfs_rq)))
+ if (WARN_ON_ONCE_DEFERRED(was_idle == cfs_rq_is_idle(grp_cfs_rq)))
goto next_cpu;
idle_task_delta = grp_cfs_rq->h_nr_queued -
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 4ee8faf01441a3..506d0f1afa58f9 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -170,7 +170,7 @@ static void destroy_rt_bandwidth(struct rt_bandwidth *rt_b)
static inline struct task_struct *rt_task_of(struct sched_rt_entity *rt_se)
{
- WARN_ON_ONCE(!rt_entity_is_task(rt_se));
+ WARN_ON_ONCE_DEFERRED(!rt_entity_is_task(rt_se));
return container_of(rt_se, struct task_struct, rt);
}
@@ -178,13 +178,13 @@ static inline struct task_struct *rt_task_of(struct sched_rt_entity *rt_se)
static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq)
{
/* Cannot fold with non-CONFIG_RT_GROUP_SCHED version, layout */
- WARN_ON(!rt_group_sched_enabled() && rt_rq->tg != &root_task_group);
+ WARN_ON_DEFERRED(!rt_group_sched_enabled() && rt_rq->tg != &root_task_group);
return rt_rq->rq;
}
static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)
{
- WARN_ON(!rt_group_sched_enabled() && rt_se->rt_rq->tg != &root_task_group);
+ WARN_ON_DEFERRED(!rt_group_sched_enabled() && rt_se->rt_rq->tg != &root_task_group);
return rt_se->rt_rq;
}
@@ -192,7 +192,7 @@ static inline struct rq *rq_of_rt_se(struct sched_rt_entity *rt_se)
{
struct rt_rq *rt_rq = rt_se->rt_rq;
- WARN_ON(!rt_group_sched_enabled() && rt_rq->tg != &root_task_group);
+ WARN_ON_DEFERRED(!rt_group_sched_enabled() && rt_rq->tg != &root_task_group);
return rt_rq->rq;
}
@@ -493,7 +493,7 @@ typedef struct task_group *rt_rq_iter_t;
static inline struct task_group *next_task_group(struct task_group *tg)
{
if (!rt_group_sched_enabled()) {
- WARN_ON(tg != &root_task_group);
+ WARN_ON_DEFERRED(tg != &root_task_group);
return NULL;
}
@@ -723,7 +723,7 @@ static void __disable_runtime(struct rq *rq)
* We cannot be left wanting - that would mean some runtime
* leaked out of the system.
*/
- WARN_ON_ONCE(want);
+ WARN_ON_ONCE_DEFERRED(want);
balanced:
/*
* Disable all the borrow logic by pretending we have inf
@@ -1094,7 +1094,7 @@ dec_rt_prio(struct rt_rq *rt_rq, int prio)
if (rt_rq->rt_nr_running) {
- WARN_ON(prio < prev_prio);
+ WARN_ON_DEFERRED(prio < prev_prio);
/*
* This may have been our highest task, and therefore
@@ -1131,7 +1131,7 @@ dec_rt_group(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
if (rt_se_boosted(rt_se))
rt_rq->rt_nr_boosted--;
- WARN_ON(!rt_rq->rt_nr_running && rt_rq->rt_nr_boosted);
+ WARN_ON_DEFERRED(!rt_rq->rt_nr_running && rt_rq->rt_nr_boosted);
}
#else /* !CONFIG_RT_GROUP_SCHED: */
@@ -1176,7 +1176,7 @@ void inc_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
{
int prio = rt_se_prio(rt_se);
- WARN_ON(!rt_prio(prio));
+ WARN_ON_DEFERRED(!rt_prio(prio));
rt_rq->rt_nr_running += rt_se_nr_running(rt_se);
rt_rq->rr_nr_running += rt_se_rr_nr_running(rt_se);
@@ -1187,8 +1187,8 @@ void inc_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
static inline
void dec_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
{
- WARN_ON(!rt_prio(rt_se_prio(rt_se)));
- WARN_ON(!rt_rq->rt_nr_running);
+ WARN_ON_DEFERRED(!rt_prio(rt_se_prio(rt_se)));
+ WARN_ON_DEFERRED(!rt_rq->rt_nr_running);
rt_rq->rt_nr_running -= rt_se_nr_running(rt_se);
rt_rq->rr_nr_running -= rt_se_rr_nr_running(rt_se);
@@ -1348,7 +1348,7 @@ static void __enqueue_rt_entity(struct sched_rt_entity *rt_se, unsigned int flag
}
if (move_entity(flags)) {
- WARN_ON_ONCE(rt_se->on_list);
+ WARN_ON_ONCE_DEFERRED(rt_se->on_list);
if (flags & ENQUEUE_HEAD)
list_add(&rt_se->run_list, queue);
else
@@ -1368,7 +1368,7 @@ static void __dequeue_rt_entity(struct sched_rt_entity *rt_se, unsigned int flag
struct rt_prio_array *array = &rt_rq->active;
if (move_entity(flags)) {
- WARN_ON_ONCE(!rt_se->on_list);
+ WARN_ON_ONCE_DEFERRED(!rt_se->on_list);
__delist_rt_entity(rt_se, array);
}
rt_se->on_rq = 0;
@@ -1684,7 +1684,7 @@ static struct sched_rt_entity *pick_next_rt_entity(struct rt_rq *rt_rq)
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
- if (WARN_ON_ONCE(list_empty(queue)))
+ if (WARN_ON_ONCE_DEFERRED(list_empty(queue)))
return NULL;
next = list_entry(queue->next, struct sched_rt_entity, run_list);
@@ -2016,7 +2016,7 @@ static int push_rt_task(struct rq *rq, bool pull)
return 0;
}
- if (WARN_ON(next_task == rq->curr))
+ if (WARN_ON_DEFERRED(next_task == rq->curr))
return 0;
/* We might release rq lock */
@@ -2316,8 +2316,8 @@ static void pull_rt_task(struct rq *this_rq)
* the to-be-scheduled task?
*/
if (p && (p->prio < this_rq->rt.highest_prio.curr)) {
- WARN_ON(p == src_rq->curr);
- WARN_ON(!task_on_rq_queued(p));
+ WARN_ON_DEFERRED(p == src_rq->curr);
+ WARN_ON_DEFERRED(!task_on_rq_queued(p));
/*
* There's a chance that p is higher in priority
@@ -2583,7 +2583,7 @@ static int task_is_throttled_rt(struct task_struct *p, int cpu)
#ifdef CONFIG_RT_GROUP_SCHED // XXX maybe add task_rt_rq(), see also sched_rt_period_rt_rq
rt_rq = task_group(p)->rt_rq[cpu];
- WARN_ON(!rt_group_sched_enabled() && rt_rq->tg != &root_task_group);
+ WARN_ON_DEFERRED(!rt_group_sched_enabled() && rt_rq->tg != &root_task_group);
#else
rt_rq = &cpu_rq(cpu)->rt;
#endif
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 9f63b15d309d11..f74f9cd44e0986 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1684,7 +1684,7 @@ static inline void update_idle_core(struct rq *rq) { }
static inline struct task_struct *task_of(struct sched_entity *se)
{
- WARN_ON_ONCE(!entity_is_task(se));
+ WARN_ON_ONCE_DEFERRED(!entity_is_task(se));
return container_of(se, struct task_struct, se);
}
@@ -1766,7 +1766,7 @@ static inline void assert_clock_updated(struct rq *rq)
* The only reason for not seeing a clock update since the
* last rq_pin_lock() is if we're currently skipping updates.
*/
- WARN_ON_ONCE(rq->clock_update_flags < RQCF_ACT_SKIP);
+ WARN_ON_ONCE_DEFERRED(rq->clock_update_flags < RQCF_ACT_SKIP);
}
static inline u64 rq_clock(struct rq *rq)
@@ -1813,7 +1813,7 @@ static inline void rq_clock_cancel_skipupdate(struct rq *rq)
static inline void rq_clock_start_loop_update(struct rq *rq)
{
lockdep_assert_rq_held(rq);
- WARN_ON_ONCE(rq->clock_update_flags & RQCF_ACT_SKIP);
+ WARN_ON_ONCE_DEFERRED(rq->clock_update_flags & RQCF_ACT_SKIP);
rq->clock_update_flags |= RQCF_ACT_SKIP;
}
@@ -1870,9 +1870,9 @@ static inline void scx_rq_clock_invalidate(struct rq *rq) {}
static inline void assert_balance_callbacks_empty(struct rq *rq)
{
- WARN_ON_ONCE(IS_ENABLED(CONFIG_PROVE_LOCKING) &&
- rq->balance_callback &&
- rq->balance_callback != &balance_push_callback);
+ WARN_ON_ONCE_DEFERRED(IS_ENABLED(CONFIG_PROVE_LOCKING) &&
+ rq->balance_callback &&
+ rq->balance_callback != &balance_push_callback);
}
/*
@@ -2681,7 +2681,7 @@ struct sched_class {
static inline void put_prev_task(struct rq *rq, struct task_struct *prev)
{
- WARN_ON_ONCE(rq->donor != prev);
+ WARN_ON_ONCE_DEFERRED(rq->donor != prev);
prev->sched_class->put_prev_task(rq, prev, NULL);
}
@@ -2704,7 +2704,7 @@ static inline void put_prev_set_next_task(struct rq *rq,
struct task_struct *prev,
struct task_struct *next)
{
- WARN_ON_ONCE(rq->donor != prev);
+ WARN_ON_ONCE_DEFERRED(rq->donor != prev);
__put_prev_set_next_dl_server(rq, prev, next);
@@ -3030,7 +3030,7 @@ static inline void attach_task(struct rq *rq, struct task_struct *p)
{
lockdep_assert_rq_held(rq);
- WARN_ON_ONCE(task_rq(p) != rq);
+ WARN_ON_ONCE_DEFERRED(task_rq(p) != rq);
activate_task(rq, p, ENQUEUE_NOCLOCK);
wakeup_preempt(rq, p, 0);
}
diff --git a/lib/bug.c b/lib/bug.c
index 224f4cfa4aa312..f5768f5d17b479 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -196,7 +196,7 @@ void __warn_printf(const char *fmt, struct pt_regs *regs)
static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long bugaddr, struct pt_regs *regs)
{
- bool warning, once, done, no_cut, has_args;
+ bool warning, once, done, no_cut, has_args, deferred;
const char *file, *fmt;
unsigned line;
@@ -219,6 +219,7 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga
done = bug->flags & BUGFLAG_DONE;
no_cut = bug->flags & BUGFLAG_NO_CUT_HERE;
has_args = bug->flags & BUGFLAG_ARGS;
+ deferred = bug->flags & BUGFLAG_DEFERRED;
if (warning && once) {
if (done)
@@ -229,7 +230,10 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga
*/
bug->flags |= BUGFLAG_DONE;
}
-
+ if (deferred) {
+ preempt_disable_notrace();
+ printk_deferred_enter();
+ }
/*
* BUG() and WARN_ON() families don't print a custom debug message
* before triggering the exception handler, so we must add the
@@ -245,6 +249,10 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga
/* this is a WARN_ON rather than BUG/BUG_ON */
__warn(file, line, (void *)bugaddr, BUG_GET_TAINT(bug), regs,
NULL);
+ if (deferred) {
+ printk_deferred_exit();
+ preempt_enable_notrace();
+ }
return BUG_TRAP_TYPE_WARN;
}
@@ -254,6 +262,10 @@ static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long buga
pr_crit("kernel BUG at %pB [verbose debug info unavailable]\n",
(void *)bugaddr);
+ if (deferred) {
+ printk_deferred_exit();
+ preempt_enable_notrace();
+ }
return BUG_TRAP_TYPE_BUG;
}
|
| 3/2 | 2026/06/23 14:53 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 29345 output: 104 thoughts: 1776 Thoughts: **Analysis of the "Deferred Warning" Patch**
Okay, so I'm looking at this patch. It seems like the core of the change is introducing `WARN_ON_DEFERRED` and `WARN_ON_ONCE_DEFERRED` and using them to replace the existing `WARN_ON` and `WARN_ON_ONCE` calls within the scheduler code (`kernel/sched/`). There's also some modification in `lib/bug.c` to handle a `BUGFLAG_DEFERRED`. My initial thought is to figure out if this is a "worthy" patch to test.
Digging into `lib/bug.c`, it looks like the `BUGFLAG_DEFERRED` flag, when set, will make the warning use deferred printing with `printk_deferred_enter()` and `printk_deferred_exit()`. This is essentially a functional change because the warnings will now be deferred. I do need to see, does this change the execution flow if the warning *isn't* triggered? Looking at the `WARN_ON_DEFERRED` macro, it looks like it just changes the *way* the warning is printed, not the code logic itself.
```c
#define WARN_ON_DEFERRED(condition) ({ \
int __ret_warn_on = !!(condition); \
if (unlikely(__ret_warn_on)) { \
__WARN_FLAGS(#condition, \
BUGFLAG_DEFERRED | \
BUGFLAG_TAINT(TAINT_WARN)); \
} \
unlikely(__ret_warn_on); \
})
```
So, if the condition is false, execution proceeds as before. If the condition is met, the warning is now deferred, but the execution logic remains the same (other than the additional log information).
Now, the instructions say to return "WorthFuzzing=false" if the patch only contains things like modifications to logging calls. Is changing a warning to a deferred warning a logging change? Yes, this is essentially changing `printk` to `printk_deferred` under the hood. It changes *how* the warning is reported. It doesn't modify the logic of the code being warned about. It seems the purpose is to prevent potential deadlocks, but in the context of fuzzing, the goal is not to find bugs in the reporting path but in the kernel logic itself.
I'm double-checking. The `kernel/sched/` changes appear to be *purely* replacements of `WARN_ON` with `WARN_ON_DEFERRED` and so on, so if the warning condition is met, now use deferred printk, but the execution flow is the same if the warning is not triggered.
Looking at `include/asm-generic/bug.h`, it just defines a fallback `WARN_ON_DEFERRED`. This also changes the `printk` to the `printk_deferred_enter()`.
So, it's just a logging change. There's no other logic being changed in the scheduler. It is all cosmetic.
The changes are limited to `WARN_ON_DEFERRED`, `WARN_ON_ONCE_DEFERRED`. This is purely logging. I will return WorthFuzzing=false.
|
| 4/2 | 2026/06/23 14:53 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch only introduces and applies deferred variants of WARN_ON and WARN_ON_ONCE macros (WARN_ON_DEFERRED, WARN_ON_ONCE_DEFERRED) to avoid deadlocks during warning prints in the scheduler. This is purely a logging/decorative change that does not functionally alter the normal execution flow of the kernel.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only introduces and applies deferred variants of WARN_ON and WARN_ON_ONCE macros (WARN_ON_DEFERRED, WARN_ON_ONCE_DEFERRED) to avoid deadlocks during warning prints in the scheduler. This is purely a logging/decorative change that does not functionally alter the normal execution flow of the kernel.",
"WorthFuzzing": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|