[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8837ea73-dcf5-801f-f037-267936bd65bc@suse.de>
Date: Tue, 27 Aug 2019 11:06:20 +0200
From: Johannes Thumshirn <jthumshirn@...e.de>
To: Ming Lei <ming.lei@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Long Li <longli@...rosoft.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Keith Busch <keith.busch@...el.com>, Jens Axboe <axboe@...com>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
John Garry <john.garry@...wei.com>,
Hannes Reinecke <hare@...e.com>,
linux-nvme@...ts.infradead.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH 3/4] nvme: pci: pass IRQF_RESCURE_THREAD to
request_threaded_irq
On 27/08/2019 10:53, Ming Lei wrote:
[...]
> + char *devname;
> + const struct cpumask *mask;
> + unsigned long irqflags = IRQF_SHARED;
> + int vector = pci_irq_vector(pdev, nvmeq->cq_vector);
> +
> + devname = kasprintf(GFP_KERNEL, "nvme%dq%d", nr, nvmeq->qid);
> + if (!devname)
> + return -ENOMEM;
> +
> + mask = pci_irq_get_affinity(pdev, nvmeq->cq_vector);
> + if (mask && cpumask_weight(mask) > 1)
> + irqflags |= IRQF_RESCUE_THREAD;
> +
> + return request_threaded_irq(vector, nvme_irq, NULL, irqflags,
> + devname, nvmeq);
This will leak 'devname' which gets allocated by kasprintf() a few lines
above.
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@...e.de +49 911 74053 689
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 247165, AG München)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Powered by blists - more mailing lists