summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorKoichiro Den <den@valinux.co.jp>2026-02-17 15:38:56 +0900
committerManivannan Sadhasivam <mani@kernel.org>2026-02-24 15:54:04 +0530
commit1cba96c0a795124c3229293ed7b5b5765e66f259 (patch)
tree02909af250edecf38bcebc1d7ecbf5d5eb020343 /tools/perf/scripts/python
parente81fa70179aac6ac3a6636565d5d35968dca3900 (diff)
PCI: endpoint: pci-ep-msi: Fix error unwind and prevent double alloc
pci_epf_alloc_doorbell() stores the allocated doorbell message array in epf->db_msg/epf->num_db before requesting MSI vectors. If MSI allocation fails, the array is freed but the EPF state may still point to freed memory. Clear epf->db_msg and epf->num_db on the MSI allocation failure path so that later cleanup cannot double-free the array and callers can retry allocation. Also return -EBUSY when doorbells have already been allocated to prevent leaking or overwriting an existing allocation. Fixes: 1c3b002c6bf6 ("PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller") Signed-off-by: Koichiro Den <den@valinux.co.jp> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Niklas Cassel <cassel@kernel.org> Link: https://patch.msgid.link/20260217063856.3759713-4-den@valinux.co.jp
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions