Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Surprising atf test failure



On Tue, May 20, 2014 at 06:31:09PM -0700, Paul Goyette wrote:
> My most recent amd64 test run failed with the following panic (in the 
> qemu emulated environment):
[...]
>     stat_socket: panic: kernel diagnostic assertion "(inp != NULL) ^ 
> (in6p != NULL)" failed: file "/test-bed/src/sys/netinet/tcp_usrreq.c", line 
> 254

I got hit by that one too yesterday :(

This KASSERT was added recently.

-#ifdef DIAGNOSTIC
 #ifdef INET6
-       if (inp && in6p)
-               panic("tcp_usrreq: both inp and in6p set to
 #non-NULL");
-#endif
-       if (req != PRU_SEND && req != PRU_SENDOOB && control)
-               panic("tcp_usrreq: unexpected control mbuf");
+       KASSERT((inp != NULL) ^(in6p != NULL));
 #endif
+       KASSERT(!control || (req == PRU_SEND || req == PRU_SENDOOB));

The previous construct allowed both inet and inet6 to be NULL, but the
new KASSERT do not.

Shouldn't it be instead ?

        KASSERT(!(inp != NULL && in6p != NULL));

-- 
Nicolas Joly

Biology IT Center
Institut Pasteur, Paris.


Home | Main Index | Thread Index | Old Index