[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y8bylBgnnmzaokaI@nvidia.com>
Date: Tue, 17 Jan 2023 15:10:12 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Kevin Tian <kevin.tian@...el.com>, Kalle Valo <kvalo@...nel.org>,
Leon Romanovsky <leonro@...dia.com>,
Marc Zyngier <maz@...nel.org>,
Omri Barazi <obarazi@...dia.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH rc] genirq/msi: Free the fwnode created by
msi_create_device_irq_domain()
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
Powered by blists - more mailing lists