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
bb0d234bf3
commit
45c64e5056
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