From thomas@cuivre.fr.eu.org  Wed Aug 16 12:40:42 2006
Return-Path: <thomas@cuivre.fr.eu.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5D15F16A4DD
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Aug 2006 12:40:42 +0000 (UTC)
	(envelope-from thomas@cuivre.fr.eu.org)
Received: from melamine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [82.225.155.84])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 98C2743E77
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Aug 2006 12:36:17 +0000 (GMT)
	(envelope-from thomas@cuivre.fr.eu.org)
Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000)
	id 2B0A65C411; Wed, 16 Aug 2006 14:36:10 +0200 (CEST)
Message-Id: <20060816123610.2B0A65C411@melamine.cuivre.fr.eu.org>
Date: Wed, 16 Aug 2006 14:36:10 +0200 (CEST)
From: Thomas Quinot <thomas@cuivre.fr.eu.org>
Reply-To: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: yppush: remove async i/o and add proper error handling
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         102143
>Category:       bin
>Synopsis:       [patch] yppush: remove async i/o and add proper error handling
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    thomas
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 16 12:50:20 GMT 2006
>Closed-Date:    Thu Aug 31 18:11:22 GMT 2006
>Last-Modified:  Thu Aug 31 18:11:22 GMT 2006
>Originator:     Thomas Quinot
>Release:        FreeBSD 6.1-RC i386
>Organization:
>Environment:
System: FreeBSD melamine.cuivre.fr.eu.org 6.1-RC FreeBSD 6.1-RC #0: Thu May 4 13:21:21 CEST 2006 thomas@melamine.cuivre.fr.eu.org:/space/build/obj/space/build/src/RELENG_6/sys/MELAMINE i386


	
>Description:
	YPPush currently uses asynchronous (SIGIO-based) input/output,
	and makes call to the memory allocator during handling of SIGIO,
	which can cause an abort due to incorrect reentrant invocation
	of free(3), as described here:
	http://lists.freebsd.org/pipermail/freebsd-net/2004-October/005321.html

	It also misses error handling:
	* for an incoming response with an incorrect tid;
	* for a failure to register the response RPC program,

	and has incorrect error handling for failure to allocate a job
	descriptor (this should be handled prior to registering the transient
	program, otherwise yppush_exit can't unregister it in case of malloc failure).

>How-To-Repeat:
	
>Fix:
	A patch for the first item (SIGIO issues) has been posted for review
	on freebsd-net:
	http://lists.freebsd.org/pipermail/freebsd-net/2006-August/011309.html
	where no objection was raised.

	Consequently, I'll commit it together with minor changes adding the
	missing error handlers and fixing the incorrect one.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->thomas 
Responsible-Changed-By: thomas 
Responsible-Changed-When: Wed Aug 16 12:51:07 UTC 2006 
Responsible-Changed-Why:  
I'll take care of this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102143 
State-Changed-From-To: open->patched 
State-Changed-By: thomas 
State-Changed-When: Wed Aug 16 12:59:31 UTC 2006 
State-Changed-Why:  
Patch committed: src/usr.sbin/yppush/yppush_main.c rev. 1.22. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102143 
State-Changed-From-To: patched->closed 
State-Changed-By: thomas 
State-Changed-When: Thu Aug 31 18:10:53 UTC 2006 
State-Changed-Why:  
MFC'd to RELENG_6 (yppush_main.c 1.20.2.1). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102143 
>Unformatted:
