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] [day] [month] [year] [list]
Message-ID: <BYAPR04MB57492E5376FAAF29B70A46F786C90@BYAPR04MB5749.namprd04.prod.outlook.com>
Date:   Wed, 17 Jul 2019 18:35:22 +0000
From:   Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>
To:     Logan Gunthorpe <logang@...tatee.com>,
        "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>
Subject: Re: [PATCH v2] nvmet-file: fix nvmet_file_flush() always returning an
 error

On 07/15/2019 03:17 PM, Logan Gunthorpe wrote:
> Presently, nvmet_file_flush() always returns a call to
> errno_to_nvme_status() but that helper doesn't take into account the
> case when errno=0. So nvmet_file_flush() always returns an error code.
>
> All other callers of errno_to_nvme_status() check for success before
> calling it.
>
> To fix this, ensure errno_to_nvme_status() returns success if the
> errno is zero. This should prevent future mistakes like this from
> happening.
>
> Fixes: c6aa3542e010 ("nvmet: add error log support for file backend")
> Signed-off-by: Logan Gunthorpe<logang@...tatee.com>
> Cc: Chaitanya Kulkarni<chaitanya.kulkarni@....com>

Thanks for the fix Logan, errno_to_nvme_status() needs to be only called 
in the case of error. Clearly bad example of calling function withing 
function.

Looks good to me.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ