Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Nov 2003 10:21:05 -0500 (EST)
From:      Dan Langille <dan@langille.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/59291: [PATCH] pthread patch committed earlier is incomplete
Message-ID:  <20031114152105.307F73E50@xeon.unixathome.org>
Resent-Message-ID: <200311141530.hAEFUKDg048806@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         59291
>Category:       kern
>Synopsis:       [PATCH] pthread patch committed earlier is incomplete
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 14 07:30:19 PST 2003
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031114152105.307F73E50>