[PATCH v2] ocxl: fix pci device refcount leak when calling get_function_0()
Michael Ellerman
patch-notifications at ellerman.id.au
Wed Nov 30 20:24:23 AEDT 2022
On Mon, 21 Nov 2022 23:43:39 +0800, Yang Yingliang wrote:
> get_function_0() calls pci_get_domain_bus_and_slot(), as comment
> says, it returns a pci device with refcount increment, so after
> using it, pci_dev_put() needs be called.
>
> Get the device reference when get_function_0() is not called, so
> pci_dev_put() can be called in the error path and callers
> unconditionally. And add comment above get_dvsec_vendor0() to tell
> callers to call pci_dev_put().
>
> [...]
Applied to powerpc/next.
[1/1] ocxl: fix pci device refcount leak when calling get_function_0()
https://git.kernel.org/powerpc/c/5f58cad1e4c65bebee34292696c6d2105eeb2027
cheers
More information about the Linuxppc-dev
mailing list