On Thu, Dec 16, 2021 at 05:31:57PM -0600, Bob Pearson wrote: > +/** > + * rxe_elem_release() - cleanup pool element when last reference dropped > + * @kref: address of the kref contained in pool element > + * > + * Caller should hold pool lock > + */ > +void rxe_elem_release(struct kref *kref) > +{ > + struct rxe_pool_elem *elem = > + container_of(kref, struct rxe_pool_elem, ref_cnt); > + struct rxe_pool *pool = elem->pool; > + > + if (pool->flags & RXE_POOL_INDEX) > + xa_erase(&pool->xarray.xa, elem->index); > + else if (pool->flags & RXE_POOL_KEY) > + rb_erase(&elem->key_node, &pool->key.tree); This doesn't hold a lock anymore before calling rb_erase() Jason