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]
Date:   Thu, 22 Sep 2022 20:22:19 +0800
From:   Chen Zhongjin <chenzhongjin@...wei.com>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
CC:     <linux-kernel@...r.kernel.org>, <kasan-dev@...glegroups.com>,
        <liu3101@...due.edu>, <nogikh@...gle.com>, <elver@...gle.com>,
        <akpm@...ux-foundation.org>, <andreyknvl@...il.com>,
        <dvyukov@...gle.com>
Subject: Re: [PATCH -next] kcov: Switch to use list_for_each_entry() helper


On 2022/9/22 20:15, Sebastian Andrzej Siewior wrote:
> On 2022-09-22 18:50:25 [+0800], Chen Zhongjin wrote:
>> --- a/kernel/kcov.c
>> +++ b/kernel/kcov.c
>> @@ -133,10 +133,8 @@ static struct kcov_remote *kcov_remote_add(struct kcov *kcov, u64 handle)
>>   static struct kcov_remote_area *kcov_remote_area_get(unsigned int size)
>>   {
>>   	struct kcov_remote_area *area;
>> -	struct list_head *pos;
>>   
>> -	list_for_each(pos, &kcov_remote_areas) {
>> -		area = list_entry(pos, struct kcov_remote_area, list);
>> +	list_for_each_entry(pos, &kcov_remote_areas, list) {
> so how does this work if you remove pos?

Oops... will fix that.


Thanks so much!

>>   		if (area->size == size) {
>>   			list_del(&area->list);
>>   			return area;
> Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ