Author: andrew Date: Tue Jun 27 10:45:13 2017 New Revision: 320403 URL: https://svnweb.freebsd.org/changeset/base/320403
Log: Some of the atomic_clear_* functions were incorrectly defined to be an atomic add. Correct these, fixing a NULL-pointer dereference in netgraph. PR: 220273 MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/atomic.h Modified: head/sys/arm64/include/atomic.h ============================================================================== --- head/sys/arm64/include/atomic.h Tue Jun 27 10:09:00 2017 (r320402) +++ head/sys/arm64/include/atomic.h Tue Jun 27 10:45:13 2017 (r320403) @@ -385,7 +385,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val #define atomic_add_rel_int atomic_add_rel_32 #define atomic_fcmpset_rel_int atomic_fcmpset_rel_32 -#define atomic_clear_rel_int atomic_add_rel_32 +#define atomic_clear_rel_int atomic_clear_rel_32 #define atomic_cmpset_rel_int atomic_cmpset_rel_32 #define atomic_set_rel_int atomic_set_rel_32 #define atomic_subtract_rel_int atomic_subtract_rel_32 @@ -413,7 +413,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val #define atomic_add_acq_long atomic_add_acq_64 #define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 -#define atomic_clear_acq_long atomic_add_acq_64 +#define atomic_clear_acq_long atomic_clear_acq_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 #define atomic_load_acq_long atomic_load_acq_64 #define atomic_set_acq_long atomic_set_acq_64 @@ -421,7 +421,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val #define atomic_add_acq_ptr atomic_add_acq_64 #define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_64 -#define atomic_clear_acq_ptr atomic_add_acq_64 +#define atomic_clear_acq_ptr atomic_clear_acq_64 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 #define atomic_load_acq_ptr atomic_load_acq_64 #define atomic_set_acq_ptr atomic_set_acq_64 @@ -448,6 +448,7 @@ atomic_thread_fence_acq(void) { dmb(ld); + } static __inline void _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"