From owner-cvs-src-old@FreeBSD.ORG Thu Sep 10 12:58:54 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64C991065692 for ; Thu, 10 Sep 2009 12:58:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5339D8FC15 for ; Thu, 10 Sep 2009 12:58:54 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n8ACws2C039339 for ; Thu, 10 Sep 2009 12:58:54 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n8ACwsE7039338 for cvs-src-old@freebsd.org; Thu, 10 Sep 2009 12:58:54 GMT (envelope-from jhb@repoman.freebsd.org) Message-Id: <200909101258.n8ACwsE7039338@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jhb@repoman.freebsd.org using -f From: John Baldwin Date: Thu, 10 Sep 2009 12:58:37 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/syscons/daemon daemon_saver.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2009 12:58:54 -0000 jhb 2009-09-10 12:58:37 UTC FreeBSD src repository Modified files: sys/dev/syscons/daemon daemon_saver.c Log: SVN rev 197062 on 2009-09-10 12:58:37Z by jhb Don't malloc a buffer while holding the prison0 mutex. Instead, use a loop where we figure out the hostname length under the lock, malloc the buffer with the lock dropped, then recheck the length under the lock and loop again if the buffer is now too small. Tested by: Norbert Koch nkoch demig de MFC after: 3 days Revision Changes Path 1.29 +15 -3 src/sys/dev/syscons/daemon/daemon_saver.c