public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lpieralisi@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH] irqchip/msi-lib: Fix fwnode refcount in msi_lib_irq_domain_select()
Date: Tue, 5 Aug 2025 11:23:04 +0200	[thread overview]
Message-ID: <aJHNeP2E76liHqUr@lpieralisi> (raw)
In-Reply-To: <87y0ryf9uj.ffs@tglx>

On Tue, Aug 05, 2025 at 10:31:32AM +0200, Thomas Gleixner wrote:
> On Mon, Aug 04 2025 at 16:55, Lorenzo Pieralisi wrote:
> >
> > msi_lib_irq_domain_select() is used in other arches, I could not
> > test on those (don't know if they have non-[DT/irqchip/acpi] specific
> > fwnodes) - from a fwnode interface perspective I think that this patch
> > does the right thing, it should not add any issue to existing code
> > to the best of my knowledge but it has to be verified.
> 
> fwnode handles are architecture and firmware agnostic.

Yep, though to make sure this does not trigger regressions I started
checking (ie I am adding an additional fwnode_handle_get/put() in there),
some fwnode helpers (eg fwnode_find_reference()) returns an error
pointer rather than NULL on error, it looks like calling
fwnode_handle_put() on that value when OF is in use is not a good idea
(ie of_node_put() checks for NULL and dereference).

There is code out there that implicitly assumes what fwnode types
are used behind the fwnode_* interface or I am missing something.

It is not arch dependent but it looks like it depends on what fwnodes
arches use - that's where my caution stems from, nothing else.

Thanks,
Lorenzo


  reply	other threads:[~2025-08-05  9:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-04 14:55 [PATCH] irqchip/msi-lib: Fix fwnode refcount in msi_lib_irq_domain_select() Lorenzo Pieralisi
2025-08-05  8:31 ` Thomas Gleixner
2025-08-05  9:23   ` Lorenzo Pieralisi [this message]
2025-08-06 14:08     ` Jonathan Cameron
2025-08-07 13:40       ` Lorenzo Pieralisi

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=aJHNeP2E76liHqUr@lpieralisi \
    --to=lpieralisi@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=tglx@linutronix.de \
    /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