Thread (4 messages) flat view 4 messages, 4 authors, 2022-11-30

Re: [PATCH v2] ocxl: fix pci device refcount leak when calling get_function_0()

From: Michael Ellerman <hidden>
Date: 2022-11-30 09:55:03

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help