public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: 白烁冉 <baishuoran@hrbeu.edu.cn>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: Kun Hu <huk23@m.fudan.edu.cn>, Jiaji Qin <jjtan24@m.fudan.edu.cn>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org, syzkaller@googlegroups.com
Subject: Re: WARNING in cm109_urb_irq_callback/usb_submit_urb
Date: Thu, 20 Mar 2025 14:35:23 +0100	[thread overview]
Message-ID: <62d91b68-2137-4a3a-a78a-c765402edd35@suse.com> (raw)
In-Reply-To: <559eddf1.5c68.195b1d950ef.Coremail.baishuoran@hrbeu.edu.cn>

[-- 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


  reply	other threads:[~2025-03-20 13:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  4:39 WARNING in cm109_urb_irq_callback/usb_submit_urb 白烁冉
2025-03-20 13:35 ` Oliver Neukum [this message]
2025-03-20 14:16   ` 胡焜
2025-03-20 14:25   ` Alan Stern
2025-03-20 15:42     ` Oliver Neukum
2025-03-20 17:25       ` Alan Stern
2025-03-27 11:42         ` Oliver Neukum
2025-03-27 14:27           ` Alan Stern
2025-04-01  9:40   ` 胡焜
2025-04-07  3:46     ` 胡焜
2025-03-20 13:40 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62d91b68-2137-4a3a-a78a-c765402edd35@suse.com \
    --to=oneukum@suse.com \
    --cc=baishuoran@hrbeu.edu.cn \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=huk23@m.fudan.edu.cn \
    --cc=jjtan24@m.fudan.edu.cn \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=syzkaller@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox