Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754664AbYGGNVq (ORCPT ); Mon, 7 Jul 2008 09:21:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753102AbYGGNVj (ORCPT ); Mon, 7 Jul 2008 09:21:39 -0400 Received: from mail.gmx.net ([213.165.64.20]:53204 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752824AbYGGNVj (ORCPT ); Mon, 7 Jul 2008 09:21:39 -0400 X-Authenticated: #31060655 X-Provags-ID: V01U2FsdGVkX1/z0IIAdKDzEOCLcri5uTN7bWp4EUq5HHq2VBjaqy T2gCb9THAi79tL Message-ID: <48721860.1010800@gmx.net> Date: Mon, 07 Jul 2008 15:21:36 +0200 From: Carl-Daniel Hailfinger User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080316 SUSE/1.1.9-1.1 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Anton Altaparmakov CC: Eric Sesterhenn , linux-ntfs-dev@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [Linux-NTFS-Dev] Oops with corrupted NTFS image References: <20080706172147.GA19559@alice> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5600000000000001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1321 Lines: 47 On 07.07.2008 10:07, Anton Altaparmakov wrote: > Hi, > > Thanks for the report. Would you be able to try the below change to > your kernel and repeat? > > On 6 Jul 2008, at 18:21, Eric Sesterhenn wrote: > >> 0xc030ad5c is in ntfs_read_locked_inode (fs/ntfs/time.h:95). >> 90 u64 t = (u64)(sle64_to_cpu(time) - NTFS_TIME_OFFSET); >> 91 /* >> 92 * Convert the time to 1-second intervals and the remainder to >> 93 * 1-nano-second intervals. >> 94 */ >> 95 ts.tv_nsec = do_div(t, 10000000) * 100; >> 96 ts.tv_sec = t; >> 97 return ts; >> 98 } >> > > Please replace the ts.tv_nsec=... and ts.tv_sec=... with: > > if (t) { > ts.tv_nsec = do_div(t, 10000000) * 100; > ts.tv_sec = t; > } else { > ts.tv_nsec = 0; > ts.tv_sec = 0; > } > AFAICS it is not the division that fails (unless a division itself can cause an access to invalid memory), but either the write to ts or the read from t. Dependign on compiler optimizations, the real root cause may be related to an access to time. Regards, Carl-Daniel -- http://www.hailfinger.org/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/