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]
Date:	Wed, 22 Jun 2016 15:40:06 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Deepa Dinamani <deepa.kernel@...il.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	tglx@...utronix.de, torvalds@...ux-foundation.org, tytso@....edu,
	viro@...iv.linux.org.uk, y2038@...ts.linaro.org,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH v2 06/24] fs: ext4: Use current_time() for inode timestamps

On Sunday, June 19, 2016 5:27:05 PM CEST Deepa Dinamani wrote:
> @@ -3727,6 +3727,7 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
>         };
>         u8 new_file_type;
>         int retval;
> +       struct timespec ctime;
>  
>         if ((ext4_encrypted_inode(old_dir) ||
>              ext4_encrypted_inode(new_dir)) &&
> @@ -3829,8 +3830,9 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
>          * Like most other Unix systems, set the ctime for inodes on a
>          * rename.
>          */
> -       old.inode->i_ctime = ext4_current_time(old.inode);
> -       new.inode->i_ctime = ext4_current_time(new.inode);
> +       ctime = current_time(old.inode);
> +       old.inode->i_ctime = ctime;
> +       new.inode->i_ctime = ctime;
>         ext4_mark_inode_dirty(handle, old.inode);
>         ext4_mark_inode_dirty(handle, new.inode);
>  

Adding a local variable here looks like it is going to cause us trouble when we
change the return type of current_time() to timespec64.

I'd write this as

	new.inode->i_ctime = old.inode->i_ctime;

instead.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ