Messages in this thread |  | | From | Chaitanya Kulkarni <> | | Subject | Re: [PATCH AUTOSEL 5.4 2/2] nvmet: seset ns->file when open fails | | Date | Tue, 18 May 2021 04:27:32 +0000 |
| |
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.
|  |