Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759173AbYFQVQ1 (ORCPT ); Tue, 17 Jun 2008 17:16:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756198AbYFQVQT (ORCPT ); Tue, 17 Jun 2008 17:16:19 -0400 Received: from one.firstfloor.org ([213.235.205.2]:33355 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755626AbYFQVQS (ORCPT ); Tue, 17 Jun 2008 17:16:18 -0400 Message-ID: <485829A1.4020705@firstfloor.org> Date: Tue, 17 Jun 2008 23:16:17 +0200 From: Andi Kleen User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: Linus Torvalds CC: Bron Gondwana , Linux Kernel Mailing List , Nick Piggin , Andrew Morton , Rob Mueller , Ingo Molnar Subject: Re: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) References: <1213682410.13174.1258837181@webmail.messagingengine.com> <1213682570.13708.1258839317@webmail.messagingengine.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 736 Lines: 22 Linus Torvalds wrote: > > On Tue, 17 Jun 2008, Linus Torvalds wrote: >> I don't think that code is reasonably salvageable. Damn. > > Hmm. Something like this *may* salvage it. > > Untested, so far (I'll reboot and test soon enough), but even if it fixes > things, it's not really very good. If that fixes anything: - The caller is broken because it shouldn't pass a faulting source to copy_to_user() - And you broken copy_from_user error reporting which shares the same code -Andi -- 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/