# Re: \[PATCH 0/37\] PCI/MSI: Enforce explicit IRQ vector management by removing devres auto-free

- From: Simon Richter \<hidden\>
- Date: 2026-02-24 04:14:48 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2026/02/8300710
- Thread: https://ratatoskr.run/linux-input/2026/02/8300709/t.md

```text
Hi,

On 2/24/26 12:29 AM, Shawn Lin wrote:

> When such a driver also uses `pcim_enable_device()`, the devres framework may
> attempt to free the IRQ vectors a second time upon device release, leading to
> a double-free. Analysis of the tree shows this hazardous pattern exists widely,
> while 35 other drivers correctly rely solely on the implicit cleanup.

Would it make sense to have a function pcim_free_irq_vectors(), to allow explicit freeing even if the device is otherwise managed, analogous to pcim_iounmap()?

   Simon
```
