All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Johan Hovold" <johan@kernel.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 3/3] driver core: take parent lock in async device attach
Date: Wed, 14 Oct 2026 13:40:50 +0000	[thread overview]
Message-ID: <sashiko-outbox-171369@kernel.org> (raw)
In-Reply-To: <20261014133109.1392265-4-johan@kernel.org>

> From: Mario Peter <mario.peter@leica-geosystems.com>
> 
> On buses with need_parent_lock set (only USB), probe() must run with the
> parent device locked. A synchronous attach after device_add() gets this
> from the caller, e.g. usb_set_configuration() holds the udev lock while
> adding interfaces. __device_attach_async_helper() runs the probe from an
> async worker instead, where that lock isn't held, and only takes
> device_lock(dev).
> 
> With async probing enabled for the hub driver (e.g. driver_async_probe=*
> or driver_async_probe=hub), this races when a multi-TT hub is
> configured. For multi-TT hubs, hub_probe() calls
> usb_set_interface(hdev, 0, 1) to select the TT-per-port altsetting, and
> usb_set_interface() creates the endpoint devices of the interface a
> second time:
> [ ... ]
>          async_schedule_dev() runs synchronously when parent lock is
> 	 held ]
> Cc: stable@vger.kernel.org	# 4.2
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261014133109.1392265-1-johan@kernel.org?part=3


  reply	other threads:[~2026-10-14 13:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 13:31 [PATCH v2 0/3] driver core: parent lock fixes Johan Hovold
2026-10-14 13:31 ` [PATCH v2 1/3] driver core: fix parent lock use-after-free on USB disconnect Johan Hovold
2026-10-14 13:43   ` sashiko-bot
2026-10-14 14:49   ` Danilo Krummrich
2026-10-14 14:58     ` Alan Stern
2026-10-14 13:31 ` [PATCH v2 2/3] driver core: take parent lock on deferred probe Johan Hovold
2026-10-14 13:48   ` sashiko-bot
2026-10-14 13:31 ` [PATCH v2 3/3] driver core: take parent lock in async device attach Johan Hovold
2026-10-14 13:40   ` sashiko-bot [this message]
2026-10-14 14:52   ` Alan Stern
2026-10-14 14:58     ` Johan Hovold

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=sashiko-outbox-171369@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=johan@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.