lkml.org 
[lkml]   [2021]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH AUTOSEL 5.4 2/2] nvmet: seset ns->file when open fails
Date
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.



\
 
 \ /
  Last update: 2021-05-18 06:28    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog