Re: [PATCH v2] rust: kernel: fix lifetime of copy_from_iter_raw
From: Miguel Ojeda
Date: Tue Nov 17 2026 - 01:40:35 EST
On Sat, Nov 14, 2026 at 2:22 PM Marwan Mohamed Zein
<marawanzein222@xxxxxxxxx> wrote:
>
> The returned slice is derived from `out`, but lifetime elision
> ties it to `self` because this is a method. Explicitly bind the
> return lifetime to `out` so the returned slice cannot outlive
> its backing buffer.
>
> Fixes: 06cb58b310ea ("rust: iov: add iov_iter abstractions for ITER_SOURCE")
> Cc: stable@xxxxxxxxxxxxxxx
> Reported-by: spidermana <xuyiwen14@xxxxxxxxx>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1265
> Signed-off-by: Marwan Mohamed Zein <marawanzein222@xxxxxxxxx>
Applied to `rust-fixes` -- tags still welcome for a day or so!
[ Reworded title. - Miguel ]
Cheers,
Miguel