diff options
author | 2025-02-09 20:58:57 +0800 | |
---|---|---|
committer | 2025-02-25 07:16:50 -0600 | |
commit | ff93e7213d6cc8d9a7b0bc64f70ed26094e168f3 (patch) | |
tree | 62ca3b10205aa37873f9b9e9ddcf050842ea0126 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | of: unittest: Add a case to test if API of_irq_parse_raw() leaks refcount (diff) | |
download | wireguard-linux-ff93e7213d6cc8d9a7b0bc64f70ed26094e168f3.tar.xz wireguard-linux-ff93e7213d6cc8d9a7b0bc64f70ed26094e168f3.zip |
of/irq: Fix device node refcount leakage in API of_irq_parse_raw()
if the node @out_irq->np got by of_irq_parse_raw() is a combo node which
consists of both controller and nexus, namely, of_irq_parse_raw() returns
due to condition (@ipar == @newpar), then the node's refcount was increased
twice, hence causes refcount leakage.
Fix by putting @out_irq->np refcount before returning due to the condition.
Also add comments about refcount of node @out_irq->np got by the API.
Fixes: 041284181226 ("of/irq: Allow matching of an interrupt-map local to an interrupt controller")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250209-of_irq_fix-v2-4-93e3a2659aa7@quicinc.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions