On Tuesday, June 16, 2015 15:17:23 Linus Lüssing wrote:
> +               /* flag checks above + mcast_handler_lock prevents this */
> +               if (unlikely(!hlist_unhashed(node)))
> +                       BUG();
> +

I don't think this will work because hlist_unhashed() checks for node->pprev 
being NULL or not. hlist_del_rcu() sets node->pprev to LIST_POISON2.

We could also use BUG_ON() for readability. Something like:

BUG_ON(node->pprev == LIST_POISON2);

Though there are not many code sections working with LIST_POISON2 outside the 
list handling code.

Cheers,
Marek

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to