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, 16 Feb 2023 11:02:14 +0900
From:   Yonggil Song <yonggil.song@...sung.com>
To:     Chao Yu <chao@...nel.org>,
        "jaegeuk@...nel.org" <jaegeuk@...nel.org>,
        "linux-f2fs-devel@...ts.sourceforge.net" 
        <linux-f2fs-devel@...ts.sourceforge.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Seokhwan Kim <sukka.kim@...sung.com>,
        Daejun Park <daejun7.park@...sung.com>
Subject: RE:(2) [PATCH v1] f2fs: fix uninitialized skipped_gc_rwsem

On 2023/2/15 10:48, Yonggil Song wrote:
>> When f2fs skipped a gc round during victim migration, there was a bug which
>> would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem
>> was not initialized. It fixes the bug by correctly initializing the
>> skipped_gc_rwsem inside the gc loop.
>
>It makes sense to me.
>
>> 
>> Fixes: d147ea4adb96 ("f2fs: introduce f2fs_gc_control to consolidate f2fs_gc parameters")
>
>How does this commits introduce the bug?

Oh, sorry I've got wrong hash.
I'll send right hash on PATCH v2.

Thanks for your comment.

>
>Thanks,
>
>> Signed-off-by: Yonggil Song <yonggil.song@...sung.com>
>> 
>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>> index b22f49a6f128..81d326abaac1 100644
>> --- a/fs/f2fs/gc.c
>> +++ b/fs/f2fs/gc.c
>> @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control)
>>   				prefree_segments(sbi));
>>   
>>   	cpc.reason = __get_cp_reason(sbi);
>> -	sbi->skipped_gc_rwsem = 0;
>>   gc_more:
>> +	sbi->skipped_gc_rwsem = 0;
>>   	if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) {
>>   		ret = -EINVAL;
>>   		goto stop;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ