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]
Message-ID: <ddd3eb76-5595-4946-95c2-067d5fbaae99@redhat.com>
Date:   Wed, 8 Jun 2022 18:55:46 +0200
From:   Javier Martinez Canillas <javierm@...hat.com>
To:     OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:     linux-kernel@...r.kernel.org,
        Lennart Poettering <lennart@...ttering.net>,
        Colin Walters <walters@...bum.org>,
        Peter Jones <pjones@...hat.com>,
        Alberto Ruiz <aruiz@...hat.com>,
        Christian Kellner <ckellner@...hat.com>,
        Chung-Chiang Cheng <cccheng@...ology.com>,
        Muhammad Usama Anjum <usama.anjum@...labora.com>,
        Alexander Larsson <alexl@...hat.com>
Subject: Re: [PATCH v4 3/4] fat: add renameat2 RENAME_EXCHANGE flag support

On 6/8/22 16:33, OGAWA Hirofumi wrote:
> Javier Martinez Canillas <javierm@...hat.com> writes:
> 
>> +	/* update ".." directory entry info */
>> +	if (old_dotdot_de) {
>> +		err = vfat_update_dotdot_de(new_dir, old_inode, old_dotdot_bh,
>> +					    old_dotdot_de);
>> +		if (err)
>> +			goto error_old_dotdot;
>> +		drop_nlink(old_dir);
>> +		inc_nlink(new_dir);
>> +	}
>> +
>> +	if (new_dotdot_de) {
>> +		err = vfat_update_dotdot_de(old_dir, new_inode, new_dotdot_bh,
>> +					    new_dotdot_de);
>> +		if (err)
>> +			goto error_new_dotdot;
>> +		drop_nlink(new_dir);
>> +		inc_nlink(old_dir);
>> +	}
> 
> Probably, we should change the nlink only if both of dotdot update are
> succeed and different file type. Otherwise, we would have to revert the
> nlink change on error path (and can remove unnecessary update as bonus).
> 

Agreed. I'll wait a few days before posting v5 in case you have more
comments on the other patches.

-- 
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ