mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Haotian Zhang <vulab@iscas.ac.cn>
Cc: linux-kernel@vger.kernel.org, Haotian Zhang <vulab@iscas.ac.cn>
Subject: Re: [PATCH] irqchip/ingenic-tcu: free generic chips on error path
Date: Wed, 19 Aug 2026 21:34:04 +0200	[thread overview]
Message-ID: <87fr09kiqb.ffs@fw13> (raw)
In-Reply-To: <20260818030206.4420-1-vulab@iscas.ac.cn>

On Tue, Aug 18 2026 at 11:02, Haotian Zhang wrote:
> irq_alloc_domain_generic_chips() stores the allocated generic chip
> data in domain->gc. On the error path taken when irq_of_parse_and_map()
> fails, ingenic_tcu_irq_init() calls irq_domain_remove() without first
> calling irq_domain_remove_generic_chips(). As the domain was created
> with irq_domain_add_linear(), which does not set
> IRQ_DOMAIN_FLAG_DESTROY_GC, irq_domain_remove() never frees the generic
> chips and the allocation leaks.
>
> Call irq_domain_remove_generic_chips() before irq_domain_remove() so
> that the generic chip data is released on the error path.

No. Set the stupid flag on the domain and let the core code do it.


      reply	other threads:[~2026-08-19 19:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  3:02 Haotian Zhang
2026-08-19 19:34 ` Thomas Gleixner [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=87fr09kiqb.ffs@fw13 \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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®