Re: [PATCH v5 01/24] rust: pci: use 'static lifetime for PCI BAR resource names
From: Gary Guo
Date: Wed May 27 2026 - 08:02:28 EST
On Mon May 25, 2026 at 9:20 PM BST, Danilo Krummrich wrote:
> pci_request_region() stores the name pointer directly in struct
> resource; use &'static CStr to ensure the pointer remains valid even if
> the Bar is leaked.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/20260522004943.CDA7C1F000E9@xxxxxxxxxxxxxxx/
> Fixes: 3c2e31d717ac ("rust: pci: move I/O infrastructure to separate file")
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
> ---
> rust/kernel/pci/io.rs | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)