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.
This commit is contained in:
parent
9b8a603ef0
commit
a4c2c79097
2
sys/contrib/ncsw/user/env/xx.c
vendored
2
sys/contrib/ncsw/user/env/xx.c
vendored
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user