On 2025-08-20 04:57, Sungho Kim wrote: > The error handling path in the P2P DMA resource setup function contains > a bug in its `pgmap_free` label. > > Memory is allocated for the `p2p_pgmap` struct, and the pointer is stored > in the `p2p_pgmap` variable. However, the error path attempts to call > devm_kfree() using the `pgmap` variable, which is a pointer to a member > field within the `p2p_pgmap` struct, not the base pointer of the allocation. > > This patch corrects the bug by passing the correct base pointer, > `p2p_pgmap`, to the devm_kfree() function. > > Signed-off-by: Sungho Kim <sungho.kim@xxxxxxxxxx> Good catch, thank you. Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>