From owner-cvs-src Wed Mar 12 8:14:57 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 055D537B401; Wed, 12 Mar 2003 08:14:56 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 969EA43FAF; Wed, 12 Mar 2003 08:14:55 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h2CGEt0U099394; Wed, 12 Mar 2003 08:14:55 -0800 (PST) (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h2CGEtUJ099393; Wed, 12 Mar 2003 08:14:55 -0800 (PST) Message-Id: <200303121614.h2CGEtUJ099393@repoman.freebsd.org> From: John Baldwin Date: Wed, 12 Mar 2003 08:14:55 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_proc.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jhb 2003/03/12 08:14:55 PST FreeBSD src repository Modified files: sys/kern kern_proc.c Log: - Avoid dropping the proc lock around a simple permissions check and just hold hold it across the check to avoid extra lock operations in the common case. - Copy in the new args to a temporary pargs structure before we drop the reference to the old one. Thus, if the copyin() fails, the process arguments are unchanged rather than being deleted. Also, p_args is no longer NULL during the sysctl operation. Revision Changes Path 1.174 +16 -18 src/sys/kern/kern_proc.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message