[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y1osp48j.ffs@tglx>
Date: Mon, 20 Feb 2023 19:43:24 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Marc Zyngier <maz@...nel.org>,
"Russell King (Oracle)" <linux@...linux.org.uk>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jason Gunthorpe <jgg@...lanox.com>,
Dave Jiang <dave.jiang@...el.com>,
Alex Williamson <alex.williamson@...hat.com>,
Kevin Tian <kevin.tian@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Logan Gunthorpe <logang@...tatee.com>,
Ashok Raj <ashok.raj@...el.com>, Jon Mason <jdmason@...zu.us>,
Allen Hubbe <allenbh@...il.com>
Subject: Re: [REGRESSION] Re: [patch V3 09/33] genirq/msi: Add range
checking to msi_insert_desc()
On Mon, Feb 20 2023 at 18:29, Marc Zyngier wrote:
> diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
> index 783a3e6a0b10..13d96495e6d0 100644
> --- a/kernel/irq/msi.c
> +++ b/kernel/irq/msi.c
> @@ -1084,10 +1084,13 @@ int msi_domain_populate_irqs(struct irq_domain *domain, struct device *dev,
> struct xarray *xa;
> int ret, virq;
>
> - if (!msi_ctrl_valid(dev, &ctrl))
> - return -EINVAL;
> -
> msi_lock_descs(dev);
> +
> + if (!msi_ctrl_valid(dev, &ctrl)) {
> + ret = -EINVAL;
> + goto unlock;
> + }
> +
> ret = msi_domain_add_simple_msi_descs(dev, &ctrl);
> if (ret)
> goto unlock;
Yup, you beat me by a minute :)
Powered by blists - more mailing lists