Merge pull request #4894 from donaldsharp/arm_wrestling

lib: Stop arm crash on shutdown
This commit is contained in:
Mark Stapp 2019-08-28 14:30:55 -04:00 committed by GitHub
commit f6e1f1918d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,6 @@
#include "atomlist.h"
DEFINE_MTYPE_STATIC(LIB, RCU_THREAD, "RCU thread")
DEFINE_MTYPE_STATIC(LIB, RCU_NEXT, "RCU sequence barrier")
DECLARE_ATOMLIST(rcu_heads, struct rcu_head, head)
@ -226,7 +225,7 @@ static void rcu_bump(void)
{
struct rcu_next *rn;
rn = XMALLOC(MTYPE_RCU_NEXT, sizeof(*rn));
rn = XMALLOC(MTYPE_RCU_THREAD, sizeof(*rn));
/* note: each RCUA_NEXT item corresponds to exactly one seqno bump.
* This means we don't need to communicate which seqno is which
@ -269,7 +268,7 @@ static void rcu_bump(void)
* "last item is being deleted - start over" case, and then we may end
* up accessing old RCU queue items that are already free'd.
*/
rcu_free_internal(MTYPE_RCU_NEXT, rn, head_free);
rcu_free_internal(MTYPE_RCU_THREAD, rn, head_free);
/* Only allow the RCU sweeper to run after these 2 items are queued.
*