* Re: [PATCH] PCI: endpoint: Fix a double free in __pci_epc_create()
[not found] <20250102093058.177866-1-make_ruc2021@163.com>
@ 2025-01-03 10:28 ` Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2025-01-03 10:28 UTC (permalink / raw)
To: make_ruc2021, linux-pci, Bjorn Helgaas, Joao Pinto,
Kishon Vijay Abraham I, Krzysztof Wilczyński,
Lorenzo Pieralisi, Manivannan Sadhasivam
Cc: stable, LKML, kernel-janitors
> The put_device(&epc->dev) call will trigger pci_epc_release() which
> frees "epc" so the kfree(epc) on the next line is a double free.
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.13-rc5#n94
> Found by code review.
Would you become interested to check how many similar control flows
can still be detected by the means of automated advanced source code analyses?
Regards,
Markus
^ permalink raw reply [flat|nested] only message in thread