From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758144AbaCDUh5 (ORCPT ); Tue, 4 Mar 2014 15:37:57 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41484 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757055AbaCDUEt (ORCPT ); Tue, 4 Mar 2014 15:04:49 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vegard Nossum , "Theodore Tso" Subject: [PATCH 3.10 07/97] ext4: dont leave i_crtime.tv_sec uninitialized Date: Tue, 4 Mar 2014 12:03:20 -0800 Message-Id: <20140304200346.354969411@linuxfoundation.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <20140304200345.895517495@linuxfoundation.org> References: <20140304200345.895517495@linuxfoundation.org> User-Agent: quilt/0.61-1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Theodore Ts'o commit 19ea80603715d473600cd993b9987bc97d042e02 upstream. If the i_crtime field is not present in the inode, don't leave the field uninitialized. Fixes: ef7f38359 ("ext4: Add nanosecond timestamps") Reported-by: Vegard Nossum Tested-by: Vegard Nossum Signed-off-by: "Theodore Ts'o" Signed-off-by: Greg Kroah-Hartman --- fs/ext4/ext4.h | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -774,6 +774,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); \