svn commit: r298526 - head/sys/contrib/ncsw/user/env
Justin Hibbits
jhibbits at FreeBSD.org
Sun Apr 24 01:38:47 UTC 2016
Author: jhibbits
Date: Sun Apr 24 01:38:45 2016
New Revision: 298526
URL: https://svnweb.freebsd.org/changeset/base/298526
Log:
Zero the newly allocated spinlock.
Not sure how this worked testing with DIAGNOSTIC set, but with it disabled this
fails due to the spinlock being "initialized" with 0xdeadc0de.
Modified:
head/sys/contrib/ncsw/user/env/xx.c
Modified: head/sys/contrib/ncsw/user/env/xx.c
==============================================================================
--- head/sys/contrib/ncsw/user/env/xx.c Sat Apr 23 22:57:54 2016 (r298525)
+++ head/sys/contrib/ncsw/user/env/xx.c Sun Apr 24 01:38:45 2016 (r298526)
@@ -561,7 +561,7 @@ XX_InitSpinlock(void)
{
struct mtx *m;
- m = malloc(sizeof(*m), M_NETCOMMSW, M_NOWAIT);
+ m = malloc(sizeof(*m), M_NETCOMMSW, M_NOWAIT | M_ZERO);
if (!m)
return (0);
More information about the svn-src-head
mailing list