From owner-cvs-all@FreeBSD.ORG Thu Apr 19 07:19:28 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5FBB16A402 for ; Thu, 19 Apr 2007 07:19:28 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3206E13C45E for ; Thu, 19 Apr 2007 07:19:27 +0000 (UTC) (envelope-from andre@freebsd.org) Received: (qmail 42838 invoked from network); 19 Apr 2007 06:43:08 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 19 Apr 2007 06:43:08 -0000 Message-ID: <46271808.7070105@freebsd.org> Date: Thu, 19 Apr 2007 09:19:36 +0200 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <200704190554.l3J5sjFk005073@repoman.freebsd.org> In-Reply-To: <200704190554.l3J5sjFk005073@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_syscalls.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2007 07:19:28 -0000 Pawel Jakub Dawidek wrote: > pjd 2007-04-19 05:54:45 UTC > > FreeBSD src repository > > Modified files: > sys/kern uipc_syscalls.c > Log: > Fix a bug in sendfile(2) when files larger than page size and nbytes=0. > When nbytes=0, sendfile(2) should use file size. Because of the bug, it > was sending half of a file. The bug is that 'off' variable can't be used > for size calculation, because it changes inside the loop, so we should > use uap->offset instead. Good catch! Thanks for finding and fixing this bug. There is a second bug that gets the accounting of the header wrong for which I've got a fix already in testing. -- Andre