diff options
| author | Dave Jiang <[email protected]> | 2024-01-05 22:07:46 +0000 |
|---|---|---|
| committer | Dan Williams <[email protected]> | 2024-01-05 22:36:29 +0000 |
| commit | 98e7ab3345e105339b7d919b4918f3c1879052ed (patch) | |
| tree | cb0921c93e842461450c1f46fad576e3f331eaf8 /drivers/base/node.c | |
| parent | cxl: Convert find_cxl_root() to return a 'struct cxl_root *' (diff) | |
| download | kernel-98e7ab3345e105339b7d919b4918f3c1879052ed.tar.gz kernel-98e7ab3345e105339b7d919b4918f3c1879052ed.zip | |
cxl: Fix device reference leak in cxl_port_perf_data_calculate()
cxl_port_perf_data_calculate() calls find_cxl_root() and does not
dereference the 'struct device' in the cxl_root->port. find_cxl_root()
calls get_device() and takes a reference on the port 'struct device'
member. Use the __free() macro to ensure the dereference happens.
Fixes: 7a4f148dd8d5 ("cxl: Compute the entire CXL path latency and bandwidth data")
Reviewed-by: Ira Weiny <[email protected]>
Signed-off-by: Dave Jiang <[email protected]>
Link: https://lore.kernel.org/r/170449246681.3779673.2288926019977963333.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <[email protected]>
Diffstat (limited to 'drivers/base/node.c')
0 files changed, 0 insertions, 0 deletions
