Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Oct 2016 13:56:00 -0700
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Eric van Gyzen <vangyzen@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r306346 - head/sys/kern
Message-ID:  <20161004205600.GN23123@FreeBSD.org>
In-Reply-To: <201609261530.u8QFUUZd020174@repo.freebsd.org>
References:  <201609261530.u8QFUUZd020174@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  Eric,

On Mon, Sep 26, 2016 at 03:30:30PM +0000, Eric van Gyzen wrote:
E> Author: vangyzen
E> Date: Mon Sep 26 15:30:30 2016
E> New Revision: 306346
E> URL: https://svnweb.freebsd.org/changeset/base/306346
E> 
E> Log:
E>   Make no assertions about mutex state when the scheduler is stopped.
E>   
E>   This changes the assert path to match the lock and unlock paths.
E>   
E>   MFC after:	1 week
E>   Sponsored by:	Dell EMC
E> 
E> Modified:
E>   head/sys/kern/kern_mutex.c
E> 
E> Modified: head/sys/kern/kern_mutex.c
E> ==============================================================================
E> --- head/sys/kern/kern_mutex.c	Mon Sep 26 15:03:31 2016	(r306345)
E> +++ head/sys/kern/kern_mutex.c	Mon Sep 26 15:30:30 2016	(r306346)
E> @@ -924,7 +924,7 @@ __mtx_assert(const volatile uintptr_t *c
E>  {
E>  	const struct mtx *m;
E>  
E> -	if (panicstr != NULL || dumping)
E> +	if (panicstr != NULL || dumping || SCHEDULER_STOPPED())
E>  		return;

I wonder if all this disjunct can be reduced just to SCHEDULER_STOPPED()?
Positive panicstr and dumping imply scheduler stopped.

-- 
Totus tuus, Glebius.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161004205600.GN23123>