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]
Date:   Thu, 31 Mar 2022 06:06:52 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Jakob Koschel <jakobkoschel@...il.com>
Cc:     linux-block <linux-block@...r.kernel.org>,
        linux-kernel@...r.kernel.org, Bart Van Assche <bvanassche@....org>,
        Mike Rapoport <rppt@...nel.org>,
        Brian Johannesmeyer <bjohannesmeyer@...il.com>,
        Cristiano Giuffrida <c.giuffrida@...nl>,
        "Bos, H.J." <h.j.bos@...nl>
Subject: Re: [PATCH v2] block: use dedicated list iterator variable

On 3/31/22 6:00 AM, Jakob Koschel wrote:
> 
> 
>> On 31. Mar 2022, at 13:59, Jens Axboe <axboe@...nel.dk> wrote:
>>
>> On 3/31/22 3:12 AM, Jakob Koschel wrote:
>>> To move the list iterator variable into the list_for_each_entry_*()
>>> macro in the future it should be avoided to use the list iterator
>>> variable after the loop body.
>>>
>>> To *never* use the list iterator variable after the loop it was
>>> concluded to use a separate iterator variable instead of a
>>> found boolean [1].
>>
>> Not a huge fan of doing a helper for this single use, but I guess it
>> does make the main function easier to code. So I guess that's fine. But
>> can you move the call down where the result is checked?
>>
>> qe = blk_lookup_qe_pair(head, q);
>> if (!qe)
>> 	return;
>>
>> I prefer no distance between call and check, makes it easier to read. I
>> can make the edit locally and note it in the commit message so you don't
>> have to re-send it. Let me know, or just resend a v3.
> 
> I'm fine with you doing the change locally, thanks!

OK, I did that, it's in. Thanks!

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ