From 4e0ee51cc2b7a542e5679edaa14aaa82be3b4abb Mon Sep 17 00:00:00 2001 From: Breno Leitao Date: Wed, 12 Aug 2026 09:03:20 -0700 Subject: workqueue: BUG_ON() instead of returning NULL in wq_node_nr_active() wq_node_nr_active() warns and returns NULL when @wq is not unbound, but every caller dereferences the result right away, so the WARN_ON_ONCE() only moves the oops one frame up, as raised by Tejun. Fix it by BUGing_ON() instead of this silly WARN_ON_ONCE(); Fixes: b72fdc651056 ("workqueue: account nr_active by the backing pool") Suggested-by: Tejun Heo Signed-off-by: Breno Leitao Signed-off-by: Tejun Heo --- kernel/workqueue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/workqueue.c b/kernel/workqueue.c index e602ab2049a7..d4ad5d93e1a7 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1625,8 +1625,7 @@ static bool is_percpu_pool(struct worker_pool *pool) static struct wq_node_nr_active *wq_node_nr_active(struct workqueue_struct *wq, int node) { - if (WARN_ON_ONCE(!(wq->flags & WQ_UNBOUND))) - return NULL; + BUG_ON(!(wq->flags & WQ_UNBOUND)); if (node == NUMA_NO_NODE) node = nr_node_ids; -- cgit v1.2.3