From: "Heyne, Maximilian" <mheyne@amazon.de>
To: Fedor Pchelkin <pchelkin@ispras.ru>
Cc: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Sven Peter <sven@svenpeter.dev>,
Chaitanya Kulkarni <kch@nvidia.com>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Hector Martin <marcan@marcan.st>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
"Avri Altman" <avri.altman@wdc.com>,
Bart Van Assche <bvanassche@acm.org>,
"Sasha Levin" <sashal@kernel.org>,
Peter Wang <peter.wang@mediatek.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
Seunghui Lee <sh043.lee@samsung.com>,
Sanjeev Yadav <sanjeev.y@mediatek.com>,
Wonkon Kim <wkon.kim@samsung.com>,
Brian Kao <powenkao@google.com>, Hannes Reinecke <hare@suse.de>,
Ming Lei <ming.lei@redhat.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"asahi@lists.linux.dev" <asahi@lists.linux.dev>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 6.1.y 5/8] nvme-apple: remove an extra queue reference
Date: Thu, 2 Apr 2026 12:31:59 +0000 [thread overview]
Message-ID: <20260402-anti-cuba-1ea02cea@mheyne-amazon> (raw)
In-Reply-To: <20260401232116-53765a086f3855a30962fb81-pchelkin@ispras>
On Wed, Apr 01, 2026 at 11:45:57PM +0300, Fedor Pchelkin wrote:
> Hello,
>
> "Heyne, Maximilian" <mheyne@amazon.de> wrote:
> > From: Christoph Hellwig <hch@lst.de>
> >
> > [ Upstream commit 941f7298c70c7668416e7845fa76eb72c07d966b ]
> >
> > Now that blk_mq_destroy_queue does not release the queue reference, there
> > is no need for a second admin queue reference to be held by the
> > apple_nvme structure.
>
> This patch is probably buggy in upstream. It removes extra reference
> ->get, but doesn't remove the corresponding ->put which is located
> inside apple_nvme_free_ctrl().
Now I'm seeing this as well. Has the same problem as the pci driver in
6.1 where blk_put_queue is called from nvme_free_ctrl() and again from
apple_nvme_free_ctrl(). Thank you for catching this. I don't have the
hardware to test this.
Are you going to send a fix upstream? It's looks to be broken on master,
too.
>
> I'm reporting here currently just for the heads up - was looking at the
> same nvme regression problem at 6.1.y, found this thread, and the
> nvme-apple changes appeared suspicious.
>
> nvme-apple patch is not required to fix the regression (this also holds
> true for [PATCH 6.1.y 3/8] scsi: remove an extra queue reference). Maybe
> they shouldn't go to stable.
I think, I'll send a v2 of the patch set without these 2 patches. It's
probably easier for Greg to apply.
>
> That said, the other part of the backport series FWIW looks good to me,
> and I've also verified it resolves the 6.1.y regression.
You may leave a Tested-by if you want ;-)
>
> Thanks.
>
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
> > Reviewed-by: Sven Peter <sven@svenpeter.dev>
> > Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
> > Reviewed-by: Keith Busch <kbusch@kernel.org>
> > Link: https://lore.kernel.org/r/20221018135720.670094-5-hch@lst.de
> > Signed-off-by: Jens Axboe <axboe@kernel.dk>
> > Signed-off-by: Maximilian Heyne <mheyne@amazon.de>
> > ---
> > drivers/nvme/host/apple.c | 9 ---------
> > 1 file changed, 9 deletions(-)
> >
> > diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
> > index c5fc293c22123..c84ebfcfdeb88 100644
> > --- a/drivers/nvme/host/apple.c
> > +++ b/drivers/nvme/host/apple.c
> > @@ -1507,15 +1507,6 @@ static int apple_nvme_probe(struct platform_device *pdev)
> > goto put_dev;
> > }
> >
> > - if (!blk_get_queue(anv->ctrl.admin_q)) {
> > - nvme_start_admin_queue(&anv->ctrl);
> > - blk_mq_destroy_queue(anv->ctrl.admin_q);
> > - blk_put_queue(anv->ctrl.admin_q);
> > - anv->ctrl.admin_q = NULL;
> > - ret = -ENODEV;
> > - goto put_dev;
> > - }
> > -
> > nvme_reset_ctrl(&anv->ctrl);
> > async_schedule(apple_nvme_async_probe, anv);
> >
> > --
> > 2.50.1
Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christof Hellmis, Andreas Stieger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597
next prev parent reply other threads:[~2026-04-02 12:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 13:36 [PATCH 6.1.y 0/8] nvme: correctly fix admin request_queue lifetime Heyne, Maximilian
2026-04-01 13:36 ` [PATCH 6.1.y 1/8] Revert "nvme: fix admin request_queue lifetime" Heyne, Maximilian
2026-04-01 13:36 ` [PATCH 6.1.y 2/8] blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue Heyne, Maximilian
2026-04-01 13:37 ` [PATCH 6.1.y 3/8] scsi: remove an extra queue reference Heyne, Maximilian
2026-04-01 13:37 ` [PATCH 6.1.y 4/8] nvme-pci: " Heyne, Maximilian
2026-04-01 13:37 ` [PATCH 6.1.y 5/8] nvme-apple: " Heyne, Maximilian
2026-04-01 20:45 ` Fedor Pchelkin
2026-04-02 12:31 ` Heyne, Maximilian [this message]
2026-04-03 9:35 ` Fedor Pchelkin
2026-04-01 13:37 ` [PATCH 6.1.y 6/8] nvme-pci: put the admin queue in nvme_dev_remove_admin Heyne, Maximilian
2026-04-01 13:37 ` [PATCH 6.1.y 7/8] nvme: fix admin request_queue lifetime Heyne, Maximilian
2026-04-01 13:37 ` [PATCH 6.1.y 8/8] nvme: fix admin queue leak on controller reset Heyne, Maximilian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260402-anti-cuba-1ea02cea@mheyne-amazon \
--to=mheyne@amazon.de \
--cc=alim.akhtar@samsung.com \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=avri.altman@wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=gregkh@linuxfoundation.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.ibm.com \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=pchelkin@ispras.ru \
--cc=peter.wang@mediatek.com \
--cc=powenkao@google.com \
--cc=sagi@grimberg.me \
--cc=sanjeev.y@mediatek.com \
--cc=sashal@kernel.org \
--cc=sh043.lee@samsung.com \
--cc=stable@vger.kernel.org \
--cc=sven@svenpeter.dev \
--cc=wkon.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox