Author: mmacy Date: Sat May 19 16:44:12 2018 New Revision: 333879 URL: https://svnweb.freebsd.org/changeset/base/333879
Log: mp_ring: fix i386 Even though 64-bit atomics are supported on i386 there are panics indicating that the code does not work correctly there. Switch to mutex based variant (and fix that while we're here). Reported by: pho, kib Modified: head/sys/net/mp_ring.c Modified: head/sys/net/mp_ring.c ============================================================================== --- head/sys/net/mp_ring.c Sat May 19 15:18:15 2018 (r333878) +++ head/sys/net/mp_ring.c Sat May 19 16:44:12 2018 (r333879) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <machine/cpu.h> -#if defined(__powerpc__) || defined(__mips__) +#if defined(__powerpc__) || defined(__mips__) || defined(__i386__) #define NO_64BIT_ATOMICS #endif @@ -345,6 +345,7 @@ ifmp_ring_enqueue(struct ifmp_ring *r, void **items, i if (n >= space_available(r, os)) { counter_u64_add(r->drops, n); MPASS(os.flags != IDLE); + mtx_unlock(&r->lock); if (os.flags == STALLED) ifmp_ring_check_drainage(r, 0); return (ENOBUFS); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"