Linux driver-core infrastructure
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nguyen Quang Le Kien <khiemtranzo532001@gmail.com>
Cc: rafael@kernel.org, dakr@kernel.org, driver-core@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	syzbot+87188222c77c0dbbdb4d@syzkaller.appspotmail.com,
	stable@vger.kernel.org
Subject: Re: [PATCH v4] driver core: avoid klist_remove() on unattached knode_driver
Date: Thu, 20 Aug 2026 10:56:48 +0200	[thread overview]
Message-ID: <2026082015-curable-overhand-306c@gregkh> (raw)
In-Reply-To: <20260820084557.129908-1-khiemtranzo532001@gmail.com>

On Thu, Aug 20, 2026 at 04:45:57PM +0800, Nguyen Quang Le Kien wrote:
> usb_driver_claim_interface() sets dev->driver directly and skips
> device_bind_driver() when the interface is not yet registered, so the
> device can reach teardown with dev->driver set but knode_driver never
> added to the driver's klist_devices. __device_release_driver() then
> unconditionally calls klist_remove() on the unattached node, which
> dereferences a NULL klist pointer in klist_put() and crashes.
> 
> Only remove the node if the device is actually bound. Use
> device_is_bound() rather than klist_node_attached() directly: the
> latter is a raw klist API and does not NULL-check dev->p, while
> device_is_bound() is the standard bound-state check used throughout
> driver core (driver_bound(), __device_attach()).
> 
> Fixes: 94e7b1c5ff20 ("[PATCH] Add a klist to struct device_driver for the devices bound to it.")
> Reported-by: syzbot+87188222c77c0dbbdb4d@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=87188222c77c0dbbdb4d
> Cc: stable@vger.kernel.org
> Signed-off-by: Nguyen Quang Le Kien <khiemtranzo532001@gmail.com>
> ---
> Changes in v4:
> - add a changelog below the --- line, as required by submitting-patches.rst
> - add Cc: stable@vger.kernel.org, Fixes: points to a released kernel

Please slow down.  As my bot said, there is no rush, no deadline, and
it's the middle of the merge window and we can't even do anything with
this anyway.

At the least, wait a week between patch revisions.  If you wish to see
patches reviewed faster, then help out with actual reviews of patches
from others.  Constantly resending stuff like this doesn't make anyone
want to review this at all.

thanks,

greg k-h

      reply	other threads:[~2026-08-20  8:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  5:55 [PATCH] driver core: avoid klist_remove() on unattached knode_driver Nguyen Quang Le Kien
2026-08-20  6:05 ` [PATCH v2] " Nguyen Quang Le Kien
2026-08-20  6:40   ` Greg KH
2026-08-20  6:56     ` Nguyen Quang Le Kien
2026-08-20  7:05       ` Greg Kroah-Hartman
2026-08-20  7:45     ` [PATCH v3] " Nguyen Quang Le Kien
2026-08-20  8:23       ` Greg Kroah-Hartman
2026-08-20  8:45         ` [PATCH v4] " Nguyen Quang Le Kien
2026-08-20  8:56           ` Greg KH [this message]

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=2026082015-curable-overhand-306c@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=khiemtranzo532001@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+87188222c77c0dbbdb4d@syzkaller.appspotmail.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