Date: Sun, 24 Apr 2016 01:38:45 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298526 - head/sys/contrib/ncsw/user/env Message-ID: <201604240138.u3O1cj1i002616@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604240138.u3O1cj1i002616>