lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200512160618.GA5403@lst.de>
Date:   Tue, 12 May 2020 18:06:18 +0200
From:   Christoph Hellwig <hch@....de>
To:     Wu Bo <wubo40@...wei.com>
Cc:     kbusch@...nel.org, axboe@...com, hch@....de, sagi@...mberg.me,
        linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
        liuzhiqiang26@...wei.com, linfeilong@...wei.com
Subject: Re: [PATCH] nvme/core:disable streams when get stream params failed

On Wed, May 06, 2020 at 04:37:01PM +0800, Wu Bo wrote:
> After enable nvme streams, then if get stream params failed, 
> We should disable streams before return error in 
> nvme_configure_directives() function.
> 
> Signed-off-by: Wu Bo <wubo40@...wei.com>
> ---
>  drivers/nvme/host/core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index f2adea9..afe1f5a 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -552,8 +552,10 @@ static int nvme_configure_directives(struct nvme_ctrl *ctrl)
>  		return ret;
>  
>  	ret = nvme_get_stream_params(ctrl, &s, NVME_NSID_ALL);
> -	if (ret)
> +	if (ret) {
> +		nvme_disable_streams(ctrl);
>  		return ret;
> +	}

Please use a out_disable goto label to not duplicate the error
handling with the other case that needs it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ