Re: [syzbot] [wireguard?] WARNING in kthread_unpark (2)

From: Hillf Danton
Date: Wed Jul 31 2024 - 07:05:35 EST


On Mon, 29 Jul 2024 08:48:30 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: dc1c8034e31b minmax: simplify min()/max()/clamp() implemen..
> git tree: upstream
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1022b573980000

#syz test upstream dc1c8034e31b

--- x/kernel/workqueue.c
+++ y/kernel/workqueue.c
@@ -2679,7 +2679,8 @@ static void worker_attach_to_pool(struct
worker->flags |= WORKER_UNBOUND;
} else {
WARN_ON_ONCE(pool->flags & POOL_BH);
- kthread_set_per_cpu(worker->task, pool->cpu);
+ if (!worker->rescue_wq)
+ kthread_set_per_cpu(worker->task, pool->cpu);
}

if (worker->rescue_wq)
--- x/drivers/input/misc/yealink.c
+++ y/drivers/input/misc/yealink.c
@@ -438,6 +438,8 @@ static void urb_irq_callback(struct urb

yealink_do_idle_tasks(yld);

+ if (status == -EPROTO)
+ return;
if (!yld->shutdown) {
ret = usb_submit_urb(yld->urb_ctl, GFP_ATOMIC);
if (ret && ret != -EPERM)
@@ -452,9 +454,12 @@ static void urb_ctl_callback(struct urb
struct yealink_dev *yld = urb->context;
int ret = 0, status = urb->status;

- if (status)
+ if (status) {
dev_err(&yld->intf->dev, "%s - urb status %d\n",
__func__, status);
+ if (status == -EPROTO)
+ return;
+ }

switch (yld->ctl_data->cmd) {
case CMD_KEYPRESS:
--