On Thu, Sep 28, 2017 at 12:10:59PM +0200, Martin Pieuchot wrote:
> I'd like reduce noise after a panic. Here's a diff to shut up splassert()
> in that case. This is similar to what we do with rwlocks.
I have already added "splassert_ctl = 0" to panic() to disable and
shut up splassert(). Actually splassert() checks splassert_ctl
before it does anything.
So I guess you do not talk about wrong spls but about splassert_fail()
messages that come from NET_ASSERT_LOCKED() and PF_ASSERT_LOCKED().
splassert_fail() has not been designed to be called if splassert_ctl
is 0. Look at the missing case in the switch (splassert_ctl).
As you reuse splassert_fail() for the NET_ASSERT, you should also
keep the semantics of sysctl kern.splassert and not check anything
in this case.
bluhm
>
> ok?
>
> Index: kern/subr_prf.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/subr_prf.c,v
> retrieving revision 1.91
> diff -u -p -r1.91 subr_prf.c
> --- kern/subr_prf.c 30 Apr 2017 16:45:46 -0000 1.91
> +++ kern/subr_prf.c 28 Sep 2017 10:09:08 -0000
> @@ -216,6 +216,8 @@ panic(const char *fmt, ...)
> void
> splassert_fail(int wantipl, int haveipl, const char *func)
> {
> + if (panicstr)
> + return;
>
> printf("splassert: %s: want %d have %d\n", func, wantipl, haveipl);
> switch (splassert_ctl) {