lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D8KC0YODQ29U.MR1GUFKWS93J@proton.me>
Date: Wed, 19 Mar 2025 15:02:30 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Danilo Krummrich <dakr@...nel.org>, bhelgaas@...gle.com, gregkh@...uxfoundation.org, rafael@...nel.org, ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com, a.hindborg@...nel.org, aliceryhl@...gle.com, tmgross@...ch.edu
Cc: linux-pci@...r.kernel.org, rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] rust: platform: require Send for Driver trait implementers

On Wed Mar 19, 2025 at 3:52 PM CET, Danilo Krummrich wrote:
> The instance of Self, returned and created by Driver::probe() is
> dropped in the bus' remove() callback.
>
> Request implementers of the Driver trait to implement Send, since the
> remove() callback is not guaranteed to run from the same thread as
> probe().
>
> Fixes: 683a63befc73 ("rust: platform: add basic platform device / driver abstractions")
> Reported-by: Alice Ryhl <aliceryhl@...gle.com>
> Closes: https://lore.kernel.org/lkml/Z9rDxOJ2V2bPjj5i@google.com/
> Signed-off-by: Danilo Krummrich <dakr@...nel.org>

Good catch Alice!

Reviewed-by: Benno Lossin <benno.lossin@...ton.me>

---
Cheers,
Benno

> ---
>  rust/kernel/platform.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs
> index 2811ca53d8b6..e37531bae8e9 100644
> --- a/rust/kernel/platform.rs
> +++ b/rust/kernel/platform.rs
> @@ -149,7 +149,7 @@ macro_rules! module_platform_driver {
>  ///     }
>  /// }
>  ///```
> -pub trait Driver {
> +pub trait Driver: Send {
>      /// The type holding driver private data about each device id supported by the driver.
>      ///
>      /// TODO: Use associated_type_defaults once stabilized:



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ