From: Markus Elfring <Markus.Elfring@web.de>
To: Guanrui Huang <guanrui.huang@linux.alibaba.com>,
linux-arm-kernel@lists.infradead.org,
kernel-janitors@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
Zenghui Yu <yuzenghui@huawei.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Shannon Zhao <shannon.zhao@linux.alibaba.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v3] irqchip/gic-v3-its: Fix double free on error
Date: Mon, 15 Apr 2024 15:06:54 +0200 [thread overview]
Message-ID: <f1a38236-82fb-40e3-a7eb-bac913ba8f0f@web.de> (raw)
In-Reply-To: <20240412021556.101792-1-guanrui.huang@linux.alibaba.com>
> In its_vpe_irq_domain_alloc, when its_vpe_init() returns an error
> with i > 0, its_vpe_irq_domain_free may free bitmap and vprop_page,
> and then there is a double free in its_vpe_irq_domain_alloc.
>
> Fix it by calling its_vpe_irq_domain_free directly, bitmap and
> vprop_page will be freed in this function.
I find this change description improvable.
Would you like to add the tag “Fixes” accordingly?
…
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -4521,8 +4521,6 @@ static int its_vpe_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
> struct page *vprop_page;
> int base, nr_ids, i, err = 0;
>
> - BUG_ON(!vm);
…
Please improve the patch granularity.
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.9-rc4#n81
Regards,
Markus
prev parent reply other threads:[~2024-04-15 13:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 2:15 Guanrui Huang
2024-04-12 3:05 ` Zenghui Yu
2024-04-15 13:06 ` Markus Elfring [this message]
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=f1a38236-82fb-40e3-a7eb-bac913ba8f0f@web.de \
--to=markus.elfring@web.de \
--cc=guanrui.huang@linux.alibaba.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=shannon.zhao@linux.alibaba.com \
--cc=tglx@linutronix.de \
--cc=yuzenghui@huawei.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
all inboxes | Powered by JetHome®