public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Johan Hovold" <johan@kernel.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	<driver-core@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] driver core: faux: fix root device registration
Date: Wed, 29 Apr 2026 00:19:06 +0200	[thread overview]
Message-ID: <DI54XY4CNFCD.30M3UJGK1M3BE@kernel.org> (raw)
In-Reply-To: <20260424153127.2647405-2-johan@kernel.org>

On Fri Apr 24, 2026 at 5:31 PM CEST, Johan Hovold wrote:
> A recent change made the faux bus root device be allocated dynamically
> but failed to provide a release function to free the memory when the
> last reference is dropped (on theoretical failure to register the device
> or bus).
>
> Fix this by using root_device_register() instead of open coding.
>
> Also add the missing sanity check when registering faux devices to avoid
> use-after-free if the bus failed to register (which would previously
> have triggered a bunch of use-after-free warnings).
>
> Fixes: 61b76d07d2b4 ("driver core: faux: stop using static struct device")
> Cc: stable@vger.kernel.org	# 7.0

I think this is more of a theoretical issue, do we need this in stable trees?

  reply	other threads:[~2026-04-28 22:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 15:31 [PATCH v2 0/2] driver core: faux: fix root device registration Johan Hovold
2026-04-24 15:31 ` [PATCH v2 1/2] " Johan Hovold
2026-04-28 22:19   ` Danilo Krummrich [this message]
2026-04-29 10:17     ` Johan Hovold
2026-04-29 10:47       ` Danilo Krummrich
2026-04-29 11:19         ` Johan Hovold
2026-04-29 14:20           ` Danilo Krummrich
2026-04-29 15:02             ` Johan Hovold
2026-04-29 20:11               ` Danilo Krummrich
2026-04-30  7:00                 ` Greg Kroah-Hartman
2026-04-30 11:29                   ` Danilo Krummrich
2026-04-24 15:31 ` [PATCH v2 2/2] driver core: faux: clean up init error handling Johan Hovold
2026-04-29 20:22 ` [PATCH v2 0/2] driver core: faux: fix root device registration Danilo Krummrich

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=DI54XY4CNFCD.30M3UJGK1M3BE@kernel.org \
    --to=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    /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