Frank Sorenson <sorenson@xxxxxxxxxx> writes: > diff --git a/fs/fat/file.c b/fs/fat/file.c > index 63ec4a5bde77..b5495df1879b 100644 > --- a/fs/fat/file.c > +++ b/fs/fat/file.c > @@ -63,7 +63,8 @@ static int fat_ioctl_set_attributes(struct file *file, u32 __user *user_attr) > > /* Equivalent to a chmod() */ > ia.ia_valid = ATTR_MODE | ATTR_CTIME; > - ia.ia_ctime = current_time(inode); > + fat_update_time(inode, NULL, S_CTIME); > + ia.ia_ctime = inode->i_ctime; This should not change inode->i_ctime before finishing all input validation. > setattr_copy(inode, attr); > + fat_update_time(inode, &inode->i_mtime, S_MTIME); > + fat_update_time(inode, &inode->i_ctime, S_CTIME); > + fat_update_time(inode, &inode->i_atime, S_ATIME); We probably should use timespec_trunc() for attr.ia_[acm]time instead. In theory, temporary change to inode->i_[acm]time is visible to user space. Thanks. -- OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>