From dan@xeon.unixathome.org  Fri Nov 14 07:21:08 2003
Return-Path: <dan@xeon.unixathome.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7DDA116A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Nov 2003 07:21:08 -0800 (PST)
Received: from xeon.unixathome.org (bast.unixathome.org [66.11.174.150])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CE2CF43FEC
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Nov 2003 07:21:05 -0800 (PST)
	(envelope-from dan@xeon.unixathome.org)
Received: by xeon.unixathome.org (Postfix, from userid 1000)
	id 307F73E50; Fri, 14 Nov 2003 10:21:05 -0500 (EST)
Message-Id: <20031114152105.307F73E50@xeon.unixathome.org>
Date: Fri, 14 Nov 2003 10:21:05 -0500 (EST)
From: Dan Langille <dan@langille.org>
Reply-To: Dan Langille <dan@langille.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] pthread patch committed earlier is incomplete
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         59291
>Category:       kern
>Synopsis:       [PATCH] pthread patch committed earlier is incomplete
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    deischen
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 14 07:30:19 PST 2003
>Closed-Date:    Wed Dec 17 08:44:49 PST 2003
>Last-Modified:  Sun Dec 28 16:10:14 PST 2003
>Originator:     Dan Langille
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
The FreeBSD Diary 
>Environment:
System: FreeBSD xeon.unixathome.org 4.8-STABLE FreeBSD 4.8-STABLE #0: Fri Aug 15 16:11:30 EDT 2003 dan@polo.unixathome.org:/usr/obj/usr/src/sys/XEON i386


	
>Description:
	
	The patch committed on Sat Oct 11 18:37:09 2003 UTC
	was incomplete.  I blame myself because the original
	patch was reversed and contained debugging code.

	See also:
	original patch:  http://docs.freebsd.org/cgi/getmsg.cgi?fetch=440371+0+/usr/local/www/db/text/2003/freebsd-hackers/20030921.freebsd-hackers
	original PR:     http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/56274
>How-To-Repeat:
	
	Apply the committed patch: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc_r/uthread/uthread_write.c.diff?r1=1.16.2.6&r2=1.16.2.7
	Run the tests described in original PR
	Run the btape test supplied with Bacula
>Fix:

	
	Apply this patch, which adds in the missing lines.

--- uthread_write.c.patch begins here ---
--- /home/dan/uthread_write.c	Fri Nov 14 09:47:55 2003
+++ uthread_write.c	Mon Sep 29 06:05:35 2003
@@ -137,6 +137,10 @@
 				else
 					ret = n;
 
+				if (n == 0) {
+					break;
+				}
+
 			/* Check if the write has completed: */
 			} else if (num >= nbytes)
 				/* Return the number of bytes written: */
--- uthread_write.c.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->deischen 
Responsible-Changed-By: kris 
Responsible-Changed-When: Fri Nov 14 10:11:37 PST 2003 
Responsible-Changed-Why:  
Dan committed the earlier patch 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59291 
State-Changed-From-To: open->closed 
State-Changed-By: deischen 
State-Changed-When: Wed Dec 17 08:44:20 PST 2003 
State-Changed-Why:  
Patch applied; thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59291 

From: "Dan Langille" <dan@langille.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/59291: [PATCH] pthread patch committed earlier is incomplete
Date: Sun, 28 Dec 2003 19:06:24 -0500

 Can this be MFC'd please?
 -- 
 Dan Langille : http://www.langille.org/
 
>Unformatted:
