mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+0154da2d403396b2bd59@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [input?] [usb?] KASAN: slab-use-after-free Read in steam_input_open
Date: Sun, 23 Feb 2025 21:25:40 +0800	[thread overview]
Message-ID: <tencent_08165DBC5DF09954CF920D98A5F78D9C9207@qq.com> (raw)
In-Reply-To: <67ba02e3.050a0220.14d86d.065b.GAE@google.com>

#syz test

diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c
index c9e65e9088b3..4a70ca5eeb1a 100644
--- a/drivers/hid/hid-steam.c
+++ b/drivers/hid/hid-steam.c
@@ -1086,6 +1086,7 @@ static void steam_work_unregister_cb(struct work_struct *work)
 	connected = steam->connected;
 	spin_unlock_irqrestore(&steam->lock, flags);
 
+	printk("steam: %p, opened: %d, connected: %d, %s\n", steam, opened, connected, __func__);
 	if (connected) {
 		if (opened) {
 			steam_sensors_unregister(steam);
@@ -1153,11 +1154,10 @@ static void steam_client_ll_close(struct hid_device *hdev)
 	struct steam_device *steam = hdev->driver_data;
 
 	unsigned long flags;
-	bool connected;
 
 	spin_lock_irqsave(&steam->lock, flags);
-	steam->client_opened--;
-	connected = steam->connected && !steam->client_opened;
+	if (steam->client_opened > 0)
+		steam->client_opened--;
 	spin_unlock_irqrestore(&steam->lock, flags);
 
 	schedule_work(&steam->unregister_work);
@@ -1322,6 +1322,7 @@ static void steam_remove(struct hid_device *hdev)
 {
 	struct steam_device *steam = hid_get_drvdata(hdev);
 
+	printk("steam: %p, hid device is group steam %d, %s\n", steam, hdev->group == HID_GROUP_STEAM, __func__);
 	if (!steam || hdev->group == HID_GROUP_STEAM) {
 		hid_hw_stop(hdev);
 		return;


  parent reply	other threads:[~2025-02-23 13:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-22 17:01 syzbot
2025-02-23  0:27 ` Hillf Danton
2025-02-23  1:24   ` syzbot
2025-02-23  2:54 ` Hillf Danton
2025-02-23  3:47   ` syzbot
2025-02-23  7:29 ` Hillf Danton
2025-02-23  7:52   ` syzbot
2025-02-23  9:03 ` Hillf Danton
2025-02-23  9:17   ` syzbot
2025-02-23  9:22 ` Edward Adam Davis
2025-02-23  9:51   ` syzbot
2025-02-23 11:39 ` Hillf Danton
2025-02-23 11:56   ` syzbot
2025-02-23 11:45 ` Vicki Pfau
2025-02-23 13:25 ` Edward Adam Davis [this message]
2025-02-23 13:43   ` syzbot
2025-02-23 14:15 ` Edward Adam Davis
2025-02-23 14:27   ` syzbot
2025-02-23 14:31 ` Edward Adam Davis
2025-02-23 14:48   ` syzbot
2025-02-24  4:54 ` Hillf Danton
2025-02-24  5:21   ` syzbot
2025-02-24 10:41 ` Hillf Danton
2025-02-24 11:47   ` syzbot
2025-02-24 12:04 ` Edward Adam Davis
2025-02-24 12:19   ` syzbot
2025-02-24 12:24 ` Edward Adam Davis
2025-02-24 12:44   ` syzbot

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=tencent_08165DBC5DF09954CF920D98A5F78D9C9207@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+0154da2d403396b2bd59@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@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

all inboxes | Powered by JetHome®