On Mon, Feb 5, 2018 at 1:20 AM, Paolo Abeni <pab...@redhat.com> wrote: > @@ -625,6 +627,8 @@ static int u32_destroy_hnode(struct tcf_proto *tp, struct > tc_u_hnode *ht, > idr_destroy(&ht->handle_idr); > idr_remove_ext(&tp_c->handle_idr, ht->handle); > RCU_INIT_POINTER(*hn, ht->next); > + > + /* the caller ensures ht->refcnt is 0 at this point */
This comment is not needed, because there is already a WARN_ON(): 608 static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht, 609 struct netlink_ext_ack *extack) 610 { 611 struct tc_u_common *tp_c = tp->data; 612 struct tc_u_hnode __rcu **hn; 613 struct tc_u_hnode *phn; 614 615 WARN_ON(ht->refcnt); Other than this, looks good. Thanks.