From: Oliver Neukum <oneukum@suse.com>
To: weipeng <coderlogicwei@gmail.com>
Cc: anna-maria@linutronix.de, frederic@kernel.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
syzkaller-bugs@googlegroups.com, tglx@linutronix.de
Subject: Re: [syzbot] [usb?] INFO: task hung in i2c_tiny_usb_disconnect
Date: Tue, 13 Jan 2026 21:23:14 +0100 [thread overview]
Message-ID: <a53fa501-dff1-4732-92c1-fab8e66ef886@suse.com> (raw)
In-Reply-To: <20260113154748.341096-1-coderlogicwei@gmail.com>
Hi,
On 13.01.26 16:47, weipeng wrote:
> @@ -287,9 +321,12 @@ static void i2c_tiny_usb_disconnect(struct usb_interface *interface)
> {
> struct i2c_tiny_usb *dev = usb_get_intfdata(interface);
>
> - i2c_del_adapter(&dev->adapter);
> + mutex_lock(&dev->usb_lock);
> usb_set_intfdata(interface, NULL);
> - i2c_tiny_usb_free(dev);
> + dev->disconnected = true;
> + mutex_unlock(&dev->usb_lock);
> +
> + queue_work(system_long_wq, &dev->release_work);
>
> dev_dbg(&interface->dev, "disconnected\n");
> }
what prevents the following sequence:
i2c_tiny_usb_disconnect() -> module unload -> i2c_tiny_usb_release()
As far as I can tell, this can happen and you'd execute already
freed memory.
Regards
Oliver
next prev parent reply other threads:[~2026-01-13 20:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-11 16:32 syzbot
2026-01-12 13:11 ` Wei Peng
2026-01-12 13:24 ` syzbot
2026-01-12 13:31 ` Wei Peng
2026-01-12 13:38 ` Wei Peng
2026-01-12 13:41 ` syzbot
2026-01-13 3:11 ` weipeng
2026-01-13 4:22 ` syzbot
2026-01-13 6:25 ` weipeng
2026-01-13 7:28 ` syzbot
2026-01-13 7:52 ` weipeng
2026-01-13 8:35 ` syzbot
2026-01-13 9:49 ` Oliver Neukum
2026-01-13 15:35 ` weipeng
2026-01-13 15:45 ` weipeng
2026-01-13 15:47 ` weipeng
2026-01-13 16:18 ` syzbot
2026-01-13 20:23 ` Oliver Neukum [this message]
2026-01-14 8:11 ` weipeng
2026-01-14 8:26 ` Oliver Neukum
2026-01-14 8:51 ` weipeng
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=a53fa501-dff1-4732-92c1-fab8e66ef886@suse.com \
--to=oneukum@suse.com \
--cc=anna-maria@linutronix.de \
--cc=coderlogicwei@gmail.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tglx@linutronix.de \
/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®