From owner-svn-src-stable@freebsd.org Tue Nov 27 22:34:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EA49113DF51; Tue, 27 Nov 2018 22:34:00 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8F0972D5D; Tue, 27 Nov 2018 22:33:59 +0000 (UTC) (envelope-from vangyzen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A883521A72; Tue, 27 Nov 2018 22:33:59 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wARMXxx2026580; Tue, 27 Nov 2018 22:33:59 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wARMXxch026578; Tue, 27 Nov 2018 22:33:59 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201811272233.wARMXxch026578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 27 Nov 2018 22:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341100 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 341100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C8F0972D5D X-Spamd-Result: default: False [0.63 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.06)[-0.064,0]; NEURAL_SPAM_LONG(0.44)[0.441,0]; NEURAL_SPAM_MEDIUM(0.25)[0.252,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 22:34:00 -0000 Author: vangyzen Date: Tue Nov 27 22:33:58 2018 New Revision: 341100 URL: https://svnweb.freebsd.org/changeset/base/341100 Log: MFC r340409 Make no assertions about lock state when the scheduler is stopped. Change the assert paths in rm, rw, and sx locks to match the lock and unlock paths. I did this for mutexes in r306346. Reported by: Travis Lane Sponsored by: Dell EMC Isilon Modified: stable/11/sys/kern/kern_rmlock.c stable/11/sys/kern/kern_rwlock.c stable/11/sys/kern/kern_sx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_rmlock.c ============================================================================== --- stable/11/sys/kern/kern_rmlock.c Tue Nov 27 22:32:34 2018 (r341099) +++ stable/11/sys/kern/kern_rmlock.c Tue Nov 27 22:33:58 2018 (r341100) @@ -740,7 +740,7 @@ _rm_assert(const struct rmlock *rm, int what, const ch { int count; - if (panicstr != NULL) + if (SCHEDULER_STOPPED()) return; switch (what) { case RA_LOCKED: Modified: stable/11/sys/kern/kern_rwlock.c ============================================================================== --- stable/11/sys/kern/kern_rwlock.c Tue Nov 27 22:32:34 2018 (r341099) +++ stable/11/sys/kern/kern_rwlock.c Tue Nov 27 22:33:58 2018 (r341100) @@ -1378,7 +1378,7 @@ __rw_assert(const volatile uintptr_t *c, int what, con { const struct rwlock *rw; - if (panicstr != NULL) + if (SCHEDULER_STOPPED()) return; rw = rwlock2rw(c); Modified: stable/11/sys/kern/kern_sx.c ============================================================================== --- stable/11/sys/kern/kern_sx.c Tue Nov 27 22:32:34 2018 (r341099) +++ stable/11/sys/kern/kern_sx.c Tue Nov 27 22:33:58 2018 (r341100) @@ -1312,7 +1312,7 @@ _sx_assert(const struct sx *sx, int what, const char * int slocked = 0; #endif - if (panicstr != NULL) + if (SCHEDULER_STOPPED()) return; switch (what) { case SA_SLOCKED: