From: Leon Romanovsky <leon@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: linux-input@vger.kernel.org, linux-usb@vger.kernel.org,
linux-pci@vger.kernel.org, linux-sound@vger.kernel.org,
dmitry.torokhov@gmail.com
Subject: Re: [PATCH v4 06/33] USB: Reject usbfs connect requests for unregistered interfaces
Date: Wed, 25 Nov 2026 16:14:42 +0200 [thread overview]
Message-ID: <20261125141442.GD14811@unreal> (raw)
In-Reply-To: <sashiko-outbox-233043@kernel.org>
On Wed, Nov 25, 2026 at 09:46:41AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Low] usb: core: devio: incorrect Fixes trailer in commit message
> --
>
> commit ef85167342ae0257c27f5a71e468b1906042fdf9
> Author: Leon Romanovsky <leon@kernel.org>
>
> > USB: Reject usbfs connect requests for unregistered interfaces
> >
> > USB core does not register DT-disabled interfaces, and an interface whose
> > registration failed stays in the active configuration. USBDEVFS_CONNECT
> > still asks driver core to attach a driver to such an interface:
> >
> > proc_ioctl()
> > device_attach()
> > __device_attach()
> >
> > The interface has no driver-core private data, so the request
> > dereferences a NULL pointer.
> >
> > Return -ENODEV for an unregistered interface. An interface claimed by a
> > sibling driver keeps reporting -EBUSY.
> >
> > Fixes: ef0ff68351be ("driver core: Probe devices asynchronously instead of the driver")
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
>
> [Severity: Low]
> Is the Fixes tag accurate?
>
> Commit ef0ff68351be ("driver core: Probe devices asynchronously instead of
> the driver") only changed bus_add_driver() and __driver_attach(), which
> iterate over already-registered devices on bus->p->klist_devices. At that
> point, __device_attach() on an unregistered device with dev->driver == NULL
> did not dereference dev->p and instead reached driver_probe_device(), which
> returned -ENODEV on !device_is_registered(dev).
>
> The unconditional dev->p->dead dereference at the top of __device_attach()
> was added later by commit 654888327e9f ("driver core: Avoid binding drivers
> to dead devices"), while skipping registration for DT-disabled USB
> interfaces was introduced by commit 01fdf179f4b0 ("usb: core: skip
> interfaces disabled in devicetree").
I don't mind, whatever Sashiko says.
Thanks
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20261124-device-trust-core-v4-0-037eb0d17b1f@nvidia.com?part=6
>
next prev parent reply other threads:[~2026-11-25 14:14 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 9:43 [PATCH v4 00/33] driver core: Authorize device trust before driver binding Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 01/33] wifi: mac80211_hwsim: lock device for manual " Leon Romanovsky
2026-11-24 18:22 ` driver core: Authorize device trust before " bluez.test.bot
2026-11-24 9:43 ` [PATCH v4 02/33] Bluetooth: btusb: Fix MediaTek ISO claim locking Leon Romanovsky
2026-11-24 10:39 ` Oliver Neukum
2026-11-25 8:49 ` Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 03/33] USB: Lock interfaces during manual driver binding Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 04/33] USB: serial: Register USB drivers with their owning module Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 05/33] USB: Reject claims of DT-disabled interfaces Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 06/33] USB: Reject usbfs connect requests for unregistered interfaces Leon Romanovsky
2026-11-25 9:46 ` sashiko-bot
2026-11-25 14:14 ` Leon Romanovsky [this message]
2026-11-24 9:43 ` [PATCH v4 07/33] USB: Release interface claims according to binding state Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 08/33] USB: Reject claims after interface registration failure Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 09/33] ALSA: usb-audio: Release interface claims when probe fails Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 10/33] USB: Pin modules for unregistered interface claims Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 11/33] USB: Add helpers to release unpublished " Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 12/33] USB: Unwind interface claims after registration or binding failure Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 13/33] PNP: Attach card devices through the driver core Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 14/33] cdx: Propagate DMA configuration errors Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 15/33] driver core: Report deferred probes through sysfs drivers_probe Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 16/33] driver core: Add a compatibility API for manual driver attachment Leon Romanovsky
2026-11-25 9:46 ` sashiko-bot
2026-11-25 18:03 ` Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 17/33] Input: gameport - use the compatibility driver attachment API Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 18/33] Input: serio " Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 19/33] net: phy: Use " Leon Romanovsky
2026-11-25 9:46 ` sashiko-bot
2026-11-25 18:04 ` Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 20/33] USB: Drain usbfs when a device is unregistered Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 21/33] driver core: Introduce a generic device trust level Leon Romanovsky
2026-11-25 0:13 ` Randy Dunlap
2026-11-25 8:06 ` Leon Romanovsky
2026-12-01 11:11 ` Alexey Kardashevskiy
2026-11-24 9:43 ` [PATCH v4 22/33] driver core: Expose device trust authorization interfaces Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 23/33] driver core: Accept device trust policy on the kernel command line Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 24/33] driver core: Accept device trust policy by driver name Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 25/33] driver core: Expose committed device trust level Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 26/33] driver core: Cover trust authorization and binding with KUnit Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 27/33] driver core: Document trust admission and initrd authorization Leon Romanovsky
2026-11-24 9:43 ` [PATCH v4 28/33] PCI: Use device trust for platform restrictions Leon Romanovsky
2026-11-25 9:46 ` sashiko-bot
2026-11-25 18:07 ` Leon Romanovsky
2026-11-24 9:44 ` [PATCH v4 29/33] iommu: Use device trust for DMA restrictions Leon Romanovsky
2026-11-24 9:44 ` [PATCH v4 30/33] driver core: Allow driver attachment with the device lock held Leon Romanovsky
2026-11-24 9:44 ` [PATCH v4 31/33] USB: Retain the result of configuration requests Leon Romanovsky
2026-11-24 9:44 ` [PATCH v4 32/33] USB: Authorize interfaces through device trust Leon Romanovsky
2026-11-25 9:46 ` sashiko-bot
2026-11-25 18:39 ` Leon Romanovsky
2026-11-24 9:44 ` [PATCH v4 33/33] USB: Authorize devices " Leon Romanovsky
2026-11-25 9:46 ` sashiko-bot
2026-11-25 18:40 ` Leon Romanovsky
2026-11-25 9:46 ` [PATCH v4 00/33] driver core: Authorize device trust before driver binding 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=20261125141442.GD14811@unreal \
--to=leon@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.