diff options
| author | Liang He <[email protected]> | 2022-07-02 10:29:36 +0800 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2022-09-05 17:30:29 +1000 |
| commit | ce63c44b63cdae892107717ba10fdb6fb4fc6cdb (patch) | |
| tree | 77cc4d6282679ff0b17363ea491a8e13c5a1c7a2 /tools/perf/scripts/python/libxed.py | |
| parent | 605c27f3802038e4623b6fd1bbfa021e1f65b5c4 (diff) | |
powerpc/pci-common: Fix refcount bug for 'phb->dn'
In pcibios_alloc_controller(), 'phb' is allocated and escaped into
global 'hose_list'. So we should call of_node_get() when a new reference
created into 'phb->dn'. And when phb is freed, we should call
of_node_put() on it.
NOTE: This function is called in the iteration of for_each_xx in
chrp_find_bridges() and pSeries_discover_phbs(). If there is no
of_node_get(), the object may be prematurely freed.
Signed-off-by: Liang He <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions