diff options
author | Zijun Hu <quic_zijuhu@quicinc.com> | 2025-02-09 15:58:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-20 11:23:17 +0300 |
commit | 36cdcee2e4a89e5183f57db59f7ecb8ef5b9a3dd (patch) | |
tree | e2ef64bb9eed84579b4a5c4624c92be7219dcf20 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | af18f70aa04ba01bd4ef3b72b6203370fe54a8cc (diff) | |
download | linux-36cdcee2e4a89e5183f57db59f7ecb8ef5b9a3dd.tar.xz |
of/irq: Fix device node refcount leakage in API of_irq_parse_one()
commit 0cb58d6c7b558a69957fabe159bfb184196e1e8d upstream.
of_irq_parse_one(@int_gen_dev, i, ...) will leak refcount of @i_th_phandle
int_gen_dev {
...
interrupts-extended = ..., <&i_th_phandle ...>, ...;
...
};
Refcount of @i_th_phandle is increased by of_parse_phandle_with_args()
but is not decreased by API of_irq_parse_one() before return, so causes
refcount leakage.
Rework the refcounting to use __free() cleanup and simplify the code to
have a single call to of_irq_parse_raw().
Also add comments about refcount of node @out_irq->np got by the API.
Fixes: 79d9701559a9 ("of/irq: create interrupts-extended property")
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-2-93e3a2659aa7@quicinc.com
[robh: Use __free() to do puts]
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