> + if (list_empty(&intf->cmd_rcvrs))
> + INIT_LIST_HEAD(&list);
> + else {
> + list.next = intf->cmd_rcvrs.next;
> + list.prev = intf->cmd_rcvrs.prev;
> + INIT_LIST_HEAD(&intf->cmd_rcvrs);
> +
> + /*
> + * At this point the list body still points to
> + * intf->cmd_rcvrs. Wait for any readers to finish
> + * using the list before we switch the list body over
> + * to the new list.
> + */
> + synchronize_rcu();
> +
> + /* Ready the list for use. */
> + list.next->prev = &list;
> + list.prev->next = &list;
> + }
This kind of thing must not be opencoded in drivers. Please add
a new list_splice_rcu helper to list.h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]