[f2fs-dev] [PATCH v2] f2fs: avoid using native allocate_segment_by_default()

2021-04-20 Thread Chao Yu
As we did for other cases, in fix_curseg_write_pointer(), let's use wrapped f2fs_allocate_new_section() instead of native allocate_segment_by_default(), by this way, it fixes to cover segment allocation with curseg_lock and sentry_lock. Signed-off-by: Chao Yu --- v2: - call wrapped function f2fs_

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid out-of-bounds memory access

2021-04-20 Thread butt3rflyh4ck
Cool, thanks! Regards, butt3rflyh4ck. On Wed, Apr 21, 2021 at 2:27 AM Jaegeuk Kim wrote: > > Hi, > > On 04/20, Salvatore Bonaccorso wrote: > > Hi, > > > > On Tue, Mar 23, 2021 at 02:43:29PM +0800, Chao Yu wrote: > > > Hi butt3rflyh4ck, > > > > > > On 2021/3/23 13:48, butt3rflyh4ck wrote: > > >

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid out-of-bounds memory access

2021-04-20 Thread Jaegeuk Kim
Hi, On 04/20, Salvatore Bonaccorso wrote: > Hi, > > On Tue, Mar 23, 2021 at 02:43:29PM +0800, Chao Yu wrote: > > Hi butt3rflyh4ck, > > > > On 2021/3/23 13:48, butt3rflyh4ck wrote: > > > Hi, I have tested the patch on 5.12.0-rc4+, it seems to fix the problem. > > > > Thanks for helping to test t

Re: [f2fs-dev] [PATCH] f2fs: fix to cover allocate_segment() with lock

2021-04-20 Thread Jaegeuk Kim
On 04/20, Chao Yu wrote: > On 2021/4/20 0:57, Jaegeuk Kim wrote: > > On 04/14, Chao Yu wrote: > > > As we did for other cases, in fix_curseg_write_pointer(), let's > > > change as below: > > > - use callback function s_ops->allocate_segment() instead of > > > raw function allocate_segment_by_defaul

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid out-of-bounds memory access

2021-04-20 Thread Salvatore Bonaccorso
Hi, On Tue, Mar 23, 2021 at 02:43:29PM +0800, Chao Yu wrote: > Hi butt3rflyh4ck, > > On 2021/3/23 13:48, butt3rflyh4ck wrote: > > Hi, I have tested the patch on 5.12.0-rc4+, it seems to fix the problem. > > Thanks for helping to test this patch. Was this patch applied? I do not see it in mainli