From: Greg Kroah-Hartman Date: Mon, 29 Apr 2024 13:26:55 +0000 (+0200) Subject: 6.8-stable patches X-Git-Tag: v4.19.313~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be0d7594a3018863bca6678a91ca54c84ab7936d;p=thirdparty%2Fkernel%2Fstable-queue.git 6.8-stable patches added patches: rust-phy-implement-send-for-registration.patch --- diff --git a/queue-6.8/rust-phy-implement-send-for-registration.patch b/queue-6.8/rust-phy-implement-send-for-registration.patch new file mode 100644 index 00000000000..e68d6c78022 --- /dev/null +++ b/queue-6.8/rust-phy-implement-send-for-registration.patch @@ -0,0 +1,37 @@ +From df70d04d56975f527b9c965322cf56e245909071 Mon Sep 17 00:00:00 2001 +From: Wedson Almeida Filho +Date: Thu, 28 Mar 2024 16:54:53 -0300 +Subject: rust: phy: implement `Send` for `Registration` + +From: Wedson Almeida Filho + +commit df70d04d56975f527b9c965322cf56e245909071 upstream. + +In preparation for requiring `Send` for `Module` implementations in the +next patch. + +Cc: FUJITA Tomonori +Cc: Trevor Gross +Cc: netdev@vger.kernel.org +Signed-off-by: Wedson Almeida Filho +Reviewed-by: Alice Ryhl +Link: https://lore.kernel.org/r/20240328195457.225001-2-wedsonaf@gmail.com +Signed-off-by: Miguel Ojeda +Signed-off-by: Greg Kroah-Hartman +--- + rust/kernel/net/phy.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/rust/kernel/net/phy.rs ++++ b/rust/kernel/net/phy.rs +@@ -640,6 +640,10 @@ pub struct Registration { + drivers: Pin<&'static mut [DriverVTable]>, + } + ++// SAFETY: The only action allowed in a `Registration` instance is dropping it, which is safe to do ++// from any thread because `phy_drivers_unregister` can be called from any thread context. ++unsafe impl Send for Registration {} ++ + impl Registration { + /// Registers a PHY driver. + pub fn register( diff --git a/queue-6.8/series b/queue-6.8/series index ee9a5060ceb..ec668f194de 100644 --- a/queue-6.8/series +++ b/queue-6.8/series @@ -131,6 +131,7 @@ selftests-seccomp-change-the-syscall-used-in-kill_thread-test.patch selftests-seccomp-handle-einval-on-unshare-clone_newpid.patch x86-cpu-amd-add-models-0x10-0x1f-to-the-zen5-range.patch x86-cpu-fix-check-for-rdpkru-in-__show_regs.patch +rust-phy-implement-send-for-registration.patch rust-kernel-require-send-for-module-implementations.patch rust-don-t-select-constructors.patch rust-init-remove-impl-zeroable-for-infallible.patch