From: "Danilo Krummrich" <dakr@kernel.org>
To: <gregkh@linuxfoundation.org>, <rafael@kernel.org>,
<david.m.ertman@intel.com>, <ira.weiny@intel.com>,
<leon@kernel.org>, <ojeda@kernel.org>, <alex.gaynor@gmail.com>,
<boqun.feng@gmail.com>, <gary@garyguo.net>,
<bjorn3_gh@protonmail.com>, <lossin@kernel.org>,
<a.hindborg@kernel.org>, <aliceryhl@google.com>,
<tmgross@umich.edu>
Cc: <rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] rust: device: fix device context of Device::parent()
Date: Fri, 17 Oct 2025 23:25:27 +0200 [thread overview]
Message-ID: <DDKWXQ40ESK6.1RXQB3T43788@kernel.org> (raw)
In-Reply-To: <20251016133251.31018-1-dakr@kernel.org>
On Thu Oct 16, 2025 at 3:31 PM CEST, Danilo Krummrich wrote:
> Regardless of the DeviceContext of a device, we can't give any
> guarantees about the DeviceContext of its parent device.
>
> This is very subtle, since it's only caused by a simple typo, i.e.
>
> Self::from_raw(parent)
>
> which preserves the DeviceContext in this case, vs.
>
> Device::from_raw(parent)
>
> which discards the DeviceContext.
>
> (I should have noticed it doing the correct thing in auxiliary::Device
> subsequently, but somehow missed it.)
>
> Hence, fix both Device::parent() and auxiliary::Device::parent().
>
> Cc: stable@vger.kernel.org
> Fixes: a4c9f71e3440 ("rust: device: implement Device::parent()")
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Applied to driver-core-linus, thanks!
prev parent reply other threads:[~2025-10-17 21:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 13:31 [PATCH] rust: device: fix device context of Device::parent() Danilo Krummrich
2025-10-16 13:47 ` Greg KH
2025-10-17 2:55 ` Alexandre Courbot
2025-10-17 13:07 ` Alice Ryhl
2025-10-17 21:25 ` Danilo Krummrich [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=DDKWXQ40ESK6.1RXQB3T43788@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=david.m.ertman@intel.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tmgross@umich.edu \
/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