From owner-svn-src-all@freebsd.org Sat Mar 12 17:28:32 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D108ACD422; Sat, 12 Mar 2016 17:28:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F21F6639; Sat, 12 Mar 2016 17:28:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2CHSVmm042165; Sat, 12 Mar 2016 17:28:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2CHSU5f042164; Sat, 12 Mar 2016 17:28:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201603121728.u2CHSU5f042164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 12 Mar 2016 17:28:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296731 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 17:28:32 -0000 Author: kib Date: Sat Mar 12 17:28:30 2016 New Revision: 296731 URL: https://svnweb.freebsd.org/changeset/base/296731 Log: MFC r295391: Remove the assert which outlived its usefulness. Modified: stable/10/sys/kern/kern_proc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Sat Mar 12 17:25:33 2016 (r296730) +++ stable/10/sys/kern/kern_proc.c Sat Mar 12 17:28:30 2016 (r296731) @@ -2908,6 +2908,12 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC int allproc_gen; +/* + * stop_all_proc() purpose is to stop all process which have usermode, + * except current process for obvious reasons. This makes it somewhat + * unreliable when invoked from multithreaded process. The service + * must not be user-callable anyway. + */ void stop_all_proc(void) { @@ -2916,17 +2922,6 @@ stop_all_proc(void) bool restart, seen_stopped, seen_exiting, stopped_some; cp = curproc; - /* - * stop_all_proc() assumes that all process which have - * usermode must be stopped, except current process, for - * obvious reasons. Since other threads in the process - * establishing global stop could unstop something, disable - * calls from multithreaded processes as precaution. The - * service must not be user-callable anyway. - */ - KASSERT((cp->p_flag & P_HADTHREADS) == 0 || - (cp->p_flag & P_KTHREAD) != 0, ("mt stop_all_proc")); - allproc_loop: sx_xlock(&allproc_lock); gen = allproc_gen; @@ -3013,7 +3008,7 @@ resume_all_proc(void) sx_xunlock(&allproc_lock); } -#define TOTAL_STOP_DEBUG 1 +/* #define TOTAL_STOP_DEBUG 1 */ #ifdef TOTAL_STOP_DEBUG volatile static int ap_resume; #include