From owner-cvs-src-old@FreeBSD.ORG Fri Mar 20 21:47:39 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 056F91065676 for ; Fri, 20 Mar 2009 21:47:39 +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 E5D8F8FC17 for ; Fri, 20 Mar 2009 21:47:38 +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 n2KLlceW067246 for ; Fri, 20 Mar 2009 21:47:38 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n2KLlcir067245 for cvs-src-old@freebsd.org; Fri, 20 Mar 2009 21:47:38 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200903202147.n2KLlcir067245@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Fri, 20 Mar 2009 21:47:26 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_6 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, 20 Mar 2009 21:47:40 -0000 kib 2009-03-20 21:47:26 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/kern kern_sysctl.c Log: SVN rev 190179 on 2009-03-20 21:47:26Z 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. Tested by: Eugene Grosbein Revision Changes Path 1.165.2.5 +6 -2 src/sys/kern/kern_sysctl.c