From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: pci: use 'static lifetime for PCI BAR resource names Date: Tue, 26 May 2026 06:47:01 +1000 Message-ID: In-Reply-To: <20260525202921.124698-2-dakr@kernel.org> References: <20260525202921.124698-1-dakr@kernel.org> <20260525202921.124698-2-dakr@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Straightforward bug fix. `pci_request_region()` stores the name pointer in `struct resource`, so if the `Bar` is leaked the name pointer could dangle. Changing from `&CStr` / `&'a CStr` to `&'static CStr`: ```rust - pub(super) fn new(pdev: &Device, num: u32, name: &CStr) -> Result { + pub(super) fn new(pdev: &Device, num: u32, name: &'static CStr) -> Result { ``` This is correct and tagged `Cc: stable` appropriately. All three call sites (`new`, `iomap_region_sized`, `iomap_region`) are updated consistently. No issues. --- Generated by Claude Code Patch Reviewer