Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263231AbUDRDMa (ORCPT ); Sat, 17 Apr 2004 23:12:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264103AbUDRDMa (ORCPT ); Sat, 17 Apr 2004 23:12:30 -0400 Received: from fw.osdl.org ([65.172.181.6]:41645 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S263231AbUDRDM2 (ORCPT ); Sat, 17 Apr 2004 23:12:28 -0400 Date: Sat, 17 Apr 2004 20:12:23 -0700 (PDT) From: Linus Torvalds To: chris@scary.beasts.org cc: akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: Nasty 2.6 sendfile() bug / regression; affects vsftpd In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 974 Lines: 32 On Sun, 18 Apr 2004 chris@scary.beasts.org wrote: > > Any chance you can review this and sneak into 2.6.soon? Your patch is horribly ugly. How about this (much simpler) patch instead? It just sets the "max" to zero if pos in NULL in the caller. That just seems a much better/saner approach. Can you test that this one-liner fixes the issue for you? Linus ---- --- 1.37/fs/read_write.c Mon Apr 12 10:54:20 2004 +++ edited/fs/read_write.c Sat Apr 17 20:09:41 2004 @@ -635,7 +635,7 @@ return ret; } - return do_sendfile(out_fd, in_fd, NULL, count, MAX_NON_LFS); + return do_sendfile(out_fd, in_fd, NULL, count, 0); } asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t __user *offset, size_t count) - 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/