diff options
author | Sungho Kim <sungho.kim@furiosa.ai> | 2025-08-20 19:57:14 +0900 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2025-08-20 15:25:54 -0500 |
commit | 6238784e502b6a9fbeb3a6b77284b29baa4135cc (patch) | |
tree | 77b21720eee0ccff8c759d3dc538d18bedb83521 /scripts/gdb/linux/interrupts.py | |
parent | 8f5ae30d69d7543eee0d70083daf4de8fe15d585 (diff) |
PCI/P2PDMA: Fix incorrect pointer usage in devm_kfree() call
The error handling path in pci_p2pdma_add_resource() contains a bug in its
`pgmap_free` label.
Memory is allocated for the `p2p_pgmap` struct, and the pointer is stored
in `p2p_pgmap`. However, the error path calls devm_kfree() with `pgmap`,
which is a pointer to a member field within the `p2p_pgmap` struct, not the
base pointer of the allocation.
Correct the bug by passing the correct base pointer, `p2p_pgmap`, to
devm_kfree().
Signed-off-by: Sungho Kim <sungho.kim@furiosa.ai>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Link: https://patch.msgid.link/20250820105714.2939896-1-sungho.kim@furiosa.ai
Diffstat (limited to 'scripts/gdb/linux/interrupts.py')
0 files changed, 0 insertions, 0 deletions