From: "Danilo Krummrich" <dakr@kernel.org>
To: "mosafer" <mohsafer@gmail.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
<driver-core@lists.linux.dev>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<syzbot+863936f50214e843ae0c@syzkaller.appspotmail.com>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] driver core: complete deferred binds when drivers_autoprobe is off
Date: Fri, 09 Oct 2026 10:52:46 +0200 [thread overview]
Message-ID: <DM06HWVAFSOW.2F050J0BT27TK@kernel.org> (raw)
In-Reply-To: <20261008154105.256340-1-mosafer@node0.quickhttpnode15.cloudfaas-pg0.wisc.cloudlab.us>
On Thu Oct 8, 2026 at 5:41 PM CEST, mosafer wrote:
> From: Mohammad Mosafer <mohsafer@gmail.com>
>
> device_add() registers a device and then runs the bus's initial probe
> via bus_probe_device() -> device_initial_probe(). With
> drivers_autoprobe disabled for the bus, device_initial_probe() skips
> __device_attach() entirely.
>
> That is correct for automatic *matching* against the bus's driver list,
> but __device_attach() also doubles as "complete a bind that a driver
> already initiated": when dev->driver has been pre-assigned outside the
> normal match/probe path, its else-if branch finishes the bind by
> calling device_bind_driver().
We've recently had another patch to fix up cases where dev->driver is
pre-assigned. Please see [1] and the corresponding thread.
IIRC, there was no reasons the remaining users can't just use a proper match()
callback instead, so we don't have to worry about those edge cases in the
future.
[1] https://lore.kernel.org/driver-core/20260820084557.129908-1-khiemtranzo532001@gmail.com/
next prev parent reply other threads:[~2026-10-09 8:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 15:41 [PATCH] driver core: complete deferred binds when drivers_autoprobe is off mosafer
2026-10-08 15:53 ` sashiko-bot
2026-10-08 21:33 ` [PATCH v2] " mosafer
2026-10-08 21:39 ` sashiko-bot
2026-10-09 8:52 ` Danilo Krummrich [this message]
2026-10-09 18:22 ` mosafer
2026-10-09 18:28 ` sashiko-bot
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=DM06HWVAFSOW.2F050J0BT27TK@kernel.org \
--to=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mohsafer@gmail.com \
--cc=rafael@kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+863936f50214e843ae0c@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