Re: WARNING in cm109_urb_irq_callback/usb_submit_urb

Oliver Neukum
2025-03-20T13:35:26Z

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

On 20.03.25 05:39, 白烁冉 wrote:
> Dear Maintainers,
>
> When using our customized Syzkaller to fuzz the latest Linux kernel, the following crash (94th)was triggered.
>

Hi,

is there a way to use the syzkaller for testing a patch?

Regards
Oliver

[-- Attachment #2: 0001-USB-cm109-fix-race-between-restarting-and-close.patch --]
[-- Type: text/x-patch, Size: 908 bytes --]

From 03d78ca8c47c8c888df7c7ae2c7109825799d236 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Thu, 20 Mar 2025 14:29:17 +0100
Subject: [PATCH] USB: cm109: fix race between restarting and close

cm109_input_close() can race with cm109_restore_state()
Hence cm109_submit_buzz_toggle() needs to check
the shutdown flag

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/input/misc/cm109.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c
index 0cfe5d4a573c..8ae62b5e45f6 100644
--- a/drivers/input/misc/cm109.c
+++ b/drivers/input/misc/cm109.c
@@ -348,6 +348,8 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev)
else
dev->ctl_data->byte[HID_OR0] &= ~BUZZER_ON;

+ if (dev->shutdown)
+ return;
error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC);
if (error)
dev_err(&dev->intf->dev,
--
2.48.1