linux-wasm/patches/kernel/0012-HACK-Workaround-broken-wq_worker_comm.patch
2025-10-31 18:38:01 +01:00

30 lines
963 B
Diff

From f3e782cb608b0bdb63bc3a2280cfbbb8acf464c0 Mon Sep 17 00:00:00 2001
From: Joel Severin <joel.severin@icemanor.se>
Date: Sat, 13 Sep 2025 21:55:10 +0200
Subject: [PATCH] HACK: Workaround broken wq_worker_comm
worker->pool seems to be corrupted somehow, root cause unknown. This
likely happens due to an unrelated memory corruption bug.
---
kernel/workqueue.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c913e333c..317e62987 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5129,7 +5129,9 @@ void wq_worker_comm(char *buf, size_t size, struct task_struct *task)
struct worker *worker = kthread_data(task);
struct worker_pool *pool = worker->pool;
- if (pool) {
+ if ((unsigned long)pool == -1UL)
+ scnprintf(buf + off, size - off, "-BROKEN");
+ else if (pool) {
raw_spin_lock_irq(&pool->lock);
/*
* ->desc tracks information (wq name or
--
2.25.1