[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878s37f0b3.ffs@nanos.tec.linutronix.de>
Date: Fri, 18 Jun 2021 21:19:12 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ming Lei <ming.lei@...hat.com>, Christoph Hellwig <hch@....de>,
Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
Sagi Grimberg <sagi@...mberg.me>,
linux-nvme@...ts.infradead.org, linux-pci@...r.kernel.org,
Keith Busch <keith.busch@...el.com>,
Marc Zyngier <marc.zyngier@....com>,
Sumit Saxena <sumit.saxena@...adcom.com>,
Kashyap Desai <kashyap.desai@...adcom.com>,
Shivasharan Srikanteshwara
<shivasharan.srikanteshwara@...adcom.com>
Subject: Re: [patch v6 3/7] genirq/affinity: Add new callback for (re)calculating interrupt sets
On Tue, Jun 15 2021 at 14:57, Bjorn Helgaas wrote:
>
>> @@ -1196,6 +1196,13 @@ int pci_alloc_irq_vectors_affinity(struc
>> /* use legacy irq if allowed */
>> if (flags & PCI_IRQ_LEGACY) {
>> if (min_vecs == 1 && dev->irq) {
>> + /*
>> + * Invoke the affinity spreading logic to ensure that
>> + * the device driver can adjust queue configuration
>> + * for the single interrupt case.
>> + */
>> + if (affd)
>> + irq_create_affinity_masks(1, affd);
>
> This looks like a leak because irq_create_affinity_masks() returns a
> pointer to kcalloc()ed space, but we throw away the pointer.
>
> Or is there something very subtle going on here, like this special
> case doesn't allocate anything? I do see the "Nothing to assign?"
> case that returns NULL with no alloc, but it's not completely trivial
> to verify that we take that case here.
Yes, it's subtle and it's subtle crap. Sorry that I did not catch that.
Thanks,
tglx
Powered by blists - more mailing lists