All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Sasha Levin <sashal@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Daniel Wagner <dwagner@suse.de>,
	Enzo Matsumiya <ematsumiya@suse.com>,
	Christoph Hellwig <hch@lst.de>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH AUTOSEL 5.4 2/2] nvmet: seset ns->file when open fails
Date: Tue, 18 May 2021 04:27:32 +0000	[thread overview]
Message-ID: <BYAPR04MB4965B34C6F9C5E833782C7C1862C9@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20210518011002.1485938-2-sashal@kernel.org

Sasha,

On 5/17/21 18:20, Sasha Levin wrote:
> From: Daniel Wagner <dwagner@suse.de>
>
> [ Upstream commit 85428beac80dbcace5b146b218697c73e367dcf5 ]
>
> Reset the ns->file value to NULL also in the error case in
> nvmet_file_ns_enable().
>
> The ns->file variable points either to file object or contains the
> error code after the filp_open() call. This can lead to following
> problem:
>
> When the user first setups an invalid file backend and tries to enable
> the ns, it will fail. Then the user switches over to a bdev backend
> and enables successfully the ns. The first received I/O will crash the
> system because the IO backend is chosen based on the ns->file value:

I think the patch subject line is being worked on since it needs to be
reset and not seset.

Not sure how we can go about fixing that.



WARNING: multiple messages have this Message-ID (diff)
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Sasha Levin <sashal@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Daniel Wagner <dwagner@suse.de>,
	Enzo Matsumiya <ematsumiya@suse.com>,
	Christoph Hellwig <hch@lst.de>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH AUTOSEL 5.4 2/2] nvmet: seset ns->file when open fails
Date: Tue, 18 May 2021 04:27:32 +0000	[thread overview]
Message-ID: <BYAPR04MB4965B34C6F9C5E833782C7C1862C9@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20210518011002.1485938-2-sashal@kernel.org

Sasha,

On 5/17/21 18:20, Sasha Levin wrote:
> From: Daniel Wagner <dwagner@suse.de>
>
> [ Upstream commit 85428beac80dbcace5b146b218697c73e367dcf5 ]
>
> Reset the ns->file value to NULL also in the error case in
> nvmet_file_ns_enable().
>
> The ns->file variable points either to file object or contains the
> error code after the filp_open() call. This can lead to following
> problem:
>
> When the user first setups an invalid file backend and tries to enable
> the ns, it will fail. Then the user switches over to a bdev backend
> and enables successfully the ns. The first received I/O will crash the
> system because the IO backend is chosen based on the ns->file value:

I think the patch subject line is being worked on since it needs to be
reset and not seset.

Not sure how we can go about fixing that.



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2021-05-18  4:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18  1:10 [PATCH AUTOSEL 5.4 1/2] ptrace: make ptrace() fail if the tracee changed its pid unexpectedly Sasha Levin
2021-05-18  1:10 ` [PATCH AUTOSEL 5.4 2/2] nvmet: seset ns->file when open fails Sasha Levin
2021-05-18  1:10   ` Sasha Levin
2021-05-18  4:27   ` Chaitanya Kulkarni [this message]
2021-05-18  4:27     ` Chaitanya Kulkarni
2021-05-18  6:37     ` Daniel Wagner
2021-05-18  6:37       ` Daniel Wagner

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=BYAPR04MB4965B34C6F9C5E833782C7C1862C9@BYAPR04MB4965.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=dwagner@suse.de \
    --cc=ematsumiya@suse.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.