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:   Mon, 15 Nov 2021 17:20:44 +0800
From:   Zhihao Cheng <chengzhihao1@...wei.com>
To:     Sascha Hauer <s.hauer@...gutronix.de>
CC:     <richard@....at>, <miquel.raynal@...tlin.com>, <vigneshr@...com>,
        <mcoquelin.stm32@...il.com>, <kirill.shutemov@...ux.intel.com>,
        <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 04/12] ubifs: Add missing iput if do_tmpfile() failed
 in rename whiteout

在 2021/11/15 16:24, Sascha Hauer 写道:
Hi Sascha,
>> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
>> index 2735ad1affed..6503e6857f6e 100644
>> --- a/fs/ubifs/dir.c
>> +++ b/fs/ubifs/dir.c
>> @@ -1334,6 +1334,8 @@ static int do_rename(struct inode *old_dir, struct dentry *old_dentry,
>>   
>>   		err = do_tmpfile(old_dir, old_dentry, S_IFCHR | WHITEOUT_MODE, &whiteout);
>>   		if (err) {
>> +			if (whiteout)
>> +				iput(whiteout);
> 
> Should this rather be done in do_tmpfile() directly?
Yes, I should have done it. Although next patch reconstructs do_rename() 
which makes this ugly judgement disappered. I will fix it along with 
other suggestions from other patches in next iteration. Thanks.
> Sascha
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ