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: <e629ae7f-509e-4cab-b069-54e889bd8cd0@nvidia.com>
Date: Thu, 27 Jun 2024 03:44:02 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: "linan666@...weicloud.com" <linan666@...weicloud.com>
CC: "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "hch@....de"
	<hch@....de>, "yukuai3@...wei.com" <yukuai3@...wei.com>,
	"yi.zhang@...wei.com" <yi.zhang@...wei.com>, "houtao1@...wei.com"
	<houtao1@...wei.com>, "yangerkun@...wei.com" <yangerkun@...wei.com>,
	"axboe@...nel.dk" <axboe@...nel.dk>
Subject: Re: [PATCH] block: clean up the check in blkdev_iomap_begin()

On 6/25/24 04:55, linan666@...weicloud.com wrote:
> From: Li Nan<linan122@...wei.com>
>
> It is odd to check the offset amidst a series of assignments. Moving this
> check to the beginning of the function makes the code look better.
>
> Signed-off-by: Li Nan<linan122@...wei.com>

it is always better to wait for assignments after all the error checks.

I believe you have verified all the callers and make sure none of the
callers rely on these assignments when this function returns -EIO and
this change will not result in change of behavior, if that is the
case :-

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>

-ck


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ