mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Farber, Eliav" <farbere@amazon.com>
To: Radu Rendec <radu@rendec.net>, Thomas Gleixner <tglx@kernel.org>,
	"Shenhar, Talel" <talel@amazon.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v4 3/8] irqchip/al-fic: keep the device_node instead of a cached name string
Date: Sat, 10 Oct 2026 18:28:19 +0000	[thread overview]
Message-ID: <BY3PR18MB47225F67839A01BDF368090EC6912@BY3PR18MB4722.namprd18.prod.outlook.com> (raw)
In-Reply-To: <c0901df657d57f2a23e606aa55c0d70b13587e45.camel@rendec.net>

On Sat, 2026-10-10 at 11:33 -0400, Radu Rendec wrote:
> It looks like this was *not* the intended behavior of of_irq_init()
> after all; it was a bug and it was fixed in commit 30724547b221
> ("of/irq: Fix remaining refcount leaks in of_irq_init()") [1].
>
> Anyway, you'll have to address this in v5 because it's clearly not
> going to work with that patch merged. I guess just take the refcount
> explicitly in al_fic_wire_init() where you store the pointer.

Agreed, thanks for catching it. 30724547b221 is already in mainline
(v7.3-rc6), so v5 is based on a tree that has it.

v5 takes the reference where the pointer is stored:

        fic->node = of_node_get(node);

and drops it on the error path:

 err_free:
        of_node_put(fic->node);
        kfree(fic);

I also reworked the commit message. It used to claim that of_irq_init()
never drops the reference on a successful init, which is no longer true.
It now says why the reference is needed and cites 30724547b221.

Thanks,
Eliav

  reply	other threads:[~2026-10-10 18:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08  9:00 [PATCH v4 0/8] irqchip/al-fic: shared parent IRQ, error/fatal outputs and affinity Eliav Farber
2026-10-08  9:00 ` [PATCH v4 1/8] irqchip/al-fic: fix argument alignment and a repeated word Eliav Farber
2026-10-08  9:00 ` [PATCH v4 2/8] irqchip/al-fic: use %pOF and raise init log level Eliav Farber
2026-10-08  9:00 ` [PATCH v4 3/8] irqchip/al-fic: keep the device_node instead of a cached name string Eliav Farber
2026-10-10 15:33   ` Radu Rendec
2026-10-10 18:28     ` Farber, Eliav [this message]
2026-10-08  9:00 ` [PATCH v4 4/8] irqchip/al-fic: switch to shared parent interrupt Eliav Farber
2026-10-10 17:19   ` Radu Rendec
2026-10-08  9:00 ` [PATCH v4 5/8] dt-bindings: interrupt-controller: amazon,al-fic: add mask selection Eliav Farber
2026-10-08  9:00 ` [PATCH v4 6/8] irqchip/al-fic: support error and fatal outputs and FIC v2 Eliav Farber
2026-10-10 17:43   ` Radu Rendec
2026-10-08  9:00 ` [PATCH v4 7/8] irqchip/al-fic: add support for FIC v3 Eliav Farber
2026-10-08  9:00 ` [PATCH v4 8/8] irqchip/al-fic: add irq_set_affinity callback Eliav Farber
2026-10-10 19:52   ` Thomas Gleixner
2026-10-11  5:01     ` Farber, Eliav

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=BY3PR18MB47225F67839A01BDF368090EC6912@BY3PR18MB4722.namprd18.prod.outlook.com \
    --to=farbere@amazon.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=radu@rendec.net \
    --cc=robh@kernel.org \
    --cc=talel@amazon.com \
    --cc=tglx@kernel.org \
    /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®