Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Maurizio Lombardi <mlombard@redhat.com>
Cc: hch@lst.de, linux-nvme@lists.infradead.org, dwagner@suse.de,
	mlombard@arkamax.eu
Subject: Re: [PATCH V3] nvme: fix crash and memory leak during invalid cdev teardown
Date: Tue, 9 Jun 2026 11:26:16 -0600	[thread overview]
Message-ID: <aihMuE_mLbLl3HMc@kbusch-mbp> (raw)
In-Reply-To: <20260608155357.256966-1-mlombard@redhat.com>

On Mon, Jun 08, 2026 at 05:53:57PM +0200, Maurizio Lombardi wrote:
> In the NVMe multipath code, if nvme_add_ns_head_cdev() fails during
> nvme_mpath_set_live(), the error is ignored. However, during teardown,
> nvme_remove_head() unconditionally calls nvme_cdev_del(). This teardown
> asymmetry leads to a kernel panic if the character device was never
> successfully initialized.

Thanks, applied to nvme-7.2.

> +	if (ret) {
> +		dev_err(ns->ctrl->device, "Unable to create the %s device",
> +			name);
> +	} else {

...

> +	if (ret) {
> +		dev_err(disk_to_dev(head->disk),
> +			"Unable to create the %s device", name);
> +	} else {

I added the missing "\n" to both prints.


      reply	other threads:[~2026-06-09 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 15:53 [PATCH V3] nvme: fix crash and memory leak during invalid cdev teardown Maurizio Lombardi
2026-06-09 17:26 ` Keith Busch [this message]

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=aihMuE_mLbLl3HMc@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=dwagner@suse.de \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mlombard@arkamax.eu \
    --cc=mlombard@redhat.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