Re: [PATCH] ext4: don't leave i_crtime.tv_sec uninitialized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/17/2014 01:31 AM, Theodore Ts'o wrote:
If the i_crtime field is not present in the inode, don't leave the
field uninitialized.

Reported-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx>
Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
---
  fs/ext4/ext4.h | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index ece5556..d3a534f 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -771,6 +771,8 @@ do {									       \
  	if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime))		       \
  		(einode)->xtime.tv_sec = 				       \
  			(signed)le32_to_cpu((raw_inode)->xtime);	       \
+	else								       \
+		(einode)->xtime.tv_sec = 0;				       \
  	if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime ## _extra))	       \
  		ext4_decode_extra_time(&(einode)->xtime,		       \
  				       raw_inode->xtime ## _extra);	       \


This fixes everything for me, thanks!


Vegard
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux