From: Amit Machhiwal <amachhiw@linux.ibm.com>
To: Jyoti Gupta <jyoti@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <chleroy@kernel.org>,
Ritesh Harjani <ritesh.list@gmail.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Amit Machhiwal <amachhiw@linux.ibm.com>,
Sourabh Jain <sourabhjain@linux.ibm.com>,
Mukesh Kumar Chaurasiya <mkchauras@gmail.com>
Subject: Re: [PATCH v3] powerpc/mpic: Fix memory leak of mpic on error paths
Date: Tue, 6 Oct 2026 13:38:22 +0530 [thread overview]
Message-ID: <20261006133717.4f51adf4-bf-amachhiw@linux.ibm.com> (raw)
In-Reply-To: <20261006065945.391637-1-jyoti@linux.ibm.com>
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 <jyoti@linux.ibm.com>
> ---
Thanks for updating this to use layered error labels. The patch looks clean and
good to me now.
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Thanks,
Amit
next prev parent reply other threads:[~2026-10-06 8:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 6:59 [PATCH v3] powerpc/mpic: Fix memory leak of mpic on error paths Jyoti Gupta
2026-10-06 8:06 ` Mukesh Kumar Chaurasiya
2026-10-06 8:08 ` Amit Machhiwal [this message]
2026-10-06 14:29 ` Ritesh Harjani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261006133717.4f51adf4-bf-amachhiw@linux.ibm.com \
--to=amachhiw@linux.ibm.com \
--cc=chleroy@kernel.org \
--cc=jyoti@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mkchauras@gmail.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sourabhjain@linux.ibm.com \
--cc=sshegde@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox