diff options
author | Zijun Hu <quic_zijuhu@quicinc.com> | 2025-02-09 15:58:57 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-20 11:23:17 +0300 |
commit | c02b57fbc93c8327c26f46fe46b5663dae0a654f (patch) | |
tree | b1818641de579c7e25c6d3c47e4568d38c177cde /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 36cdcee2e4a89e5183f57db59f7ecb8ef5b9a3dd (diff) | |
download | linux-c02b57fbc93c8327c26f46fe46b5663dae0a654f.tar.xz |
of/irq: Fix device node refcount leakage in API of_irq_parse_raw()
commit ff93e7213d6cc8d9a7b0bc64f70ed26094e168f3 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions