From owner-cvs-src-old@FreeBSD.ORG Fri Dec 19 15:24:27 2008 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 615EF10657C7 for ; Fri, 19 Dec 2008 15:24:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C82F58FC19 for ; Fri, 19 Dec 2008 15:24:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mBJFOQhB023980 for ; Fri, 19 Dec 2008 15:24:26 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mBJFOQb7023979 for cvs-src-old@freebsd.org; Fri, 19 Dec 2008 15:24:26 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200812191524.mBJFOQb7023979@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Fri, 19 Dec 2008 15:24:18 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/sys/kern kern_sysctl.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: Fri, 19 Dec 2008 15:24:27 -0000 kib 2008-12-19 15:24:18 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/kern kern_sysctl.c Log: SVN rev 186324 on 2008-12-19 15:24:18Z by kib MFC r185983: The userland_sysctl() function retries sysctl_root() until returned error is not EAGAIN. Several sysctls that inspect another process use p_candebug() for checking access right for the curproc. p_candebug() returns EAGAIN for some reasons, in particular, for the process doing exec() now. If execing process tries to lock Giant, we get a livelock, because sysctl handlers are covered by Giant, and often do not sleep. Break the livelock by dropping Giant and allowing other threads to execute in the EAGAIN loop. This commit does not merge the following change, as was discussed with jhb: [Also, do not return EAGAIN from p_candebug() when process is executing, use more appropriate EBUSY error.] MFC r185987: Uio_yield() already does DROP_GIANT/PICKUP_GIANT, no need to repeat this around the call. Approved by: re (kensmith) Revision Changes Path 1.177.2.1 +6 -2 src/sys/kern/kern_sysctl.c