Re: [f2fs-dev] [PATCH 2/2] f2fs: fix to put root inode in error path of fill_super

2014-07-24 Thread Gu Zheng
On 07/25/2014 12:55 PM, Chao Yu wrote: > We should put root inode correctly in error path of fill_super, otherwise we > may encounter a leak case of inode resource. Good catch, and it also fixed the incorrect 'goto'. > > Signed-off-by: Chao Yu Reviewed-by: Gu Zheng > --- > fs/f2fs/super.c

Re: [f2fs-dev] f2fs: Possible use-after-free when umount filesystem

2014-07-24 Thread Gu Zheng
On 07/25/2014 11:22 AM, Chao Yu wrote: > Hi, > > To Andrey: > Thanks for your test on this patch! > > To Gu: > If you do not object, let me make and resend a patch base on the one which > skip invalidating pages. Please go ahead.:) Thanks, Gu > > Regards, > Yu > >> -Original Message

[f2fs-dev] [PATCH 2/2] f2fs: fix to put root inode in error path of fill_super

2014-07-24 Thread Chao Yu
We should put root inode correctly in error path of fill_super, otherwise we may encounter a leak case of inode resource. Signed-off-by: Chao Yu --- fs/f2fs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 870fe19..34649aa 1006

[f2fs-dev] [PATCH 1/2] f2fs: avoid use invalid mapping of node_inode when evict meta inode

2014-07-24 Thread Chao Yu
Andrey Tsyvarev reported: "Using memory error detector reveals the following use-after-free error in 3.15.0: AddressSanitizer: heap-use-after-free in f2fs_evict_inode Read of size 8 by thread T22279: [] f2fs_evict_inode+0x102/0x2e0 [f2fs] [] evict+0x15f/0x290 [< inlined>] iput+0x1

Re: [f2fs-dev] f2fs: Possible use-after-free when umount filesystem

2014-07-24 Thread Chao Yu
Hi, To Andrey: Thanks for your test on this patch! To Gu: If you do not object, let me make and resend a patch base on the one which skip invalidating pages. Regards, Yu > -Original Message- > From: Andrey Tsyvarev [mailto:tsyva...@ispras.ru] > Sent: Thursday, July 24, 2014 6:15 PM > To

Re: [f2fs-dev] f2fs: Possible use-after-free when umount filesystem

2014-07-24 Thread Andrey Tsyvarev
Hi, With patch skipping invalidating pages for node_inode and meta_inode use-after-free error disappears too. 23.07.2014 7:39, Gu Zheng пишет: > Hi, > On 07/23/2014 10:12 AM, Chao Yu wrote: > >> Hi Andrey Gu, >> >>> -Original Message- >>> From: Andrey Tsyvarev [mailto:tsyva...@ispras.ru]