Re: [PATCH] rust: list: fix path of `assert_pinned!`
From: Benno Lossin
Date: Sun May 25 2025 - 13:39:20 EST
On Sun May 25, 2025 at 7:34 PM CEST, Benno Lossin wrote:
> Commit dbd5058ba60c ("rust: make pin-init its own crate") moved all
> items from pin-init into the pin-init crate, including the
> `assert_pinned!` macro.
>
> Thus fix the path.
>
> This occurrence was missed in that commit, since it has no current
> users, although binder does.
Aw damn, I edited the message, but forgot to regenerate the .patch
file... here is the edited version:
Commit dbd5058ba60c ("rust: make pin-init its own crate") moved all
items from pin-init into the pin-init crate, including the
`assert_pinned!` macro.
Thus fix the path of the sole user of the `assert_pinned!` macro.
This occurrence was missed in the commit above, since it is in a macro
has no current users (although binder is a future user).
---
Cheers,
Benno
> Cc: stable@xxxxxxxxxx # I haven't found the commit in stable yet, but just to be sure.
> Fixes: dbd5058ba60c ("rust: make pin-init its own crate")
> Signed-off-by: Benno Lossin <lossin@xxxxxxxxxx>
> ---
> rust/kernel/list/arc.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rust/kernel/list/arc.rs b/rust/kernel/list/arc.rs
> index 13c50df37b89..a88a2dc65aa7 100644
> --- a/rust/kernel/list/arc.rs
> +++ b/rust/kernel/list/arc.rs
> @@ -96,7 +96,7 @@ unsafe fn on_drop_list_arc(&self) {}
> } $($rest:tt)*) => {
> impl$(<$($generics)*>)? $crate::list::ListArcSafe<$num> for $t {
> unsafe fn on_create_list_arc_from_unique(self: ::core::pin::Pin<&mut Self>) {
> - $crate::assert_pinned!($t, $field, $fty, inline);
> + ::pin_init::assert_pinned!($t, $field, $fty, inline);
>
> // SAFETY: This field is structurally pinned as per the above assertion.
> let field = unsafe {
>
> base-commit: f26449565019315650c9fe87743b10103910ca6b