All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Kevin Tian <kevin.tian@intel.com>, Kalle Valo <kvalo@kernel.org>,
	Leon Romanovsky <leonro@nvidia.com>,
	Marc Zyngier <maz@kernel.org>, Omri Barazi <obarazi@nvidia.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH rc] genirq/msi: Free the fwnode created by msi_create_device_irq_domain()
Date: Tue, 17 Jan 2023 15:10:12 -0400	[thread overview]
Message-ID: <Y8bylBgnnmzaokaI@nvidia.com> (raw)
In-Reply-To: <87fsc9knog.ffs@tglx>

On Tue, Jan 17, 2023 at 07:42:39PM +0100, Thomas Gleixner wrote:
> Jason!
> 
> On Tue, Jan 17 2023 at 11:27, Jason Gunthorpe wrote:
> >  void msi_remove_device_irq_domain(struct device *dev, unsigned int domid)
> >  {
> > +	struct fwnode_handle *fwnode = NULL;
> >  	struct msi_domain_info *info;
> >  	struct irq_domain *domain;
> >  
> > @@ -1025,7 +1026,10 @@ void msi_remove_device_irq_domain(struct device *dev, unsigned int domid)
> >  
> >  	dev->msi.data->__domains[domid].domain = NULL;
> >  	info = domain->host_data;
> > +	if (irq_domain_is_msi_device(domain))
> > +		fwnode = domain->fwnode;
> >  	irq_domain_remove(domain);
> > +	irq_domain_free_fwnode(fwnode);
> 
> This can't work with !device domains because then fwnode is NULL and
> irq_domain_free_fwnode() will trip over its feet.

Uhh for some reason I thought I checked that. I'll send a v2

Thanks,
Jason

      reply	other threads:[~2023-01-17 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 15:27 [PATCH rc] genirq/msi: Free the fwnode created by msi_create_device_irq_domain() Jason Gunthorpe
2023-01-17 18:42 ` Thomas Gleixner
2023-01-17 19:10   ` Jason Gunthorpe [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=Y8bylBgnnmzaokaI@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=kvalo@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=obarazi@nvidia.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.