Re: [PATCH v3] powerpc/mpic: Fix memory leak of mpic on error paths

From
Amit Machhiwal <hidden>
Date
2026-10-06 08:00:31
Reply to
Jyoti Gupta, 2026-10-06
On 2026/10/06 12:29 PM, Jyoti Gupta wrote:
mpic_alloc() allocates struct mpic (and optionally the protected
sources bitmap) but does not free them when mpic_setup_error_int() or
irq_domain_create_linear() fails, leaking the memory.

Free the bitmap and the mpic in the common error path before
dropping the device node reference.

Fixes: 996983b75ceb ("powerpc/mpic: Search for open-pic device-tree node if NULL")
Signed-off-by: Jyoti Gupta <redacted>
---
Thanks for updating this to use layered error labels.  The patch looks clean and
good to me now.

Reviewed-by: Amit Machhiwal <redacted>

Thanks,
Amit
Thread (4 messages) 4 messages, 4 authors, last reply 2026-10-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help