[PATCH] nvme-pci: allocate tagset on reset if necessary

Keith Busch kbusch at kernel.org
Tue Aug 27 07:57:52 PDT 2024


On Tue, Aug 27, 2024 at 07:49:23AM +0200, Christoph Hellwig wrote:
> On Mon, Aug 26, 2024 at 11:27:19AM -0700, Keith Busch wrote:
> > +	if (!dev->ctrl.tagset) {
> > +		nvme_alloc_io_tag_set(&dev->ctrl, &dev->tagset, &nvme_mq_ops,
> > +				nvme_pci_nr_maps(dev), sizeof(struct nvme_iod));
> > +	} else {
> > +		blk_mq_update_nr_hw_queues(&dev->tagset, dev->online_queues - 1);
> 
> Overly long line here.  Maybe just return early after the allocation
> above?

Done.

I think I should also add more details to the change log because this
bug does cause a kernel crash. I think this is the first commit that
removed tagset allocation from reset_work:

Fixes: eac3ef262941f62 ("nvme-pci: split the initial probe from the rest path")
> 



More information about the Linux-nvme mailing list