From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] Squashfs: Fix oops when reading fsfuzzer corrupted filesystems Date: Thu, 5 Feb 2009 12:22:15 -0800 Message-ID: <20090205122215.adcd18db.akpm@linux-foundation.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, snakebyte@gmx.de, sliedes@cc.hut.fi, phillip@lougher.demon.co.uk To: Phillip Lougher Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:43987 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758681AbZBEUXP (ORCPT ); Thu, 5 Feb 2009 15:23:15 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 04 Feb 2009 03:07:48 +0000 Phillip Lougher wrote: > - ERROR("sb_bread failed reading block 0x%llx\n", cur_index); > + ERROR("squashfs_read_data failed to read block 0x%llx\n", index); `index' has type u64. You don't know what C type is used to implement u64, hence it must be cast to a known type before it can be passed to printk. In this case we use `unsigned long long'. The code as it stands will generate compiler warnings on some architectures. One day, maybe before we all die, we will fix this. Then we get to spend another five years weeding out all the casts we added.