> On Apr 13, 2017, at 6:18 PM, Stefan Hajnoczi <stefa...@redhat.com> wrote: > > + > +static void __vsock_deliver_tap(struct sk_buff *skb) > +{ > + int ret; > + struct vsock_tap *tmp; > + > + list_for_each_entry_rcu(tmp, &vsock_tap_all, list) { > + ret = __vsock_deliver_tap_skb(skb, tmp->dev); > + if (unlikely(ret)) > + break; > + } > + > + consume_skb(skb);
It looks like the caller will allocate the skb regardless of whether vsock_tap_all is empty, so shouldn’t the skb be consumed in vsock_deliver_tap? > +} > + > +void vsock_deliver_tap(struct sk_buff *skb) > +{ > + rcu_read_lock(); > + > + if (unlikely(!list_empty(&vsock_tap_all))) > + __vsock_deliver_tap(skb); > + > + rcu_read_unlock(); > +} > +EXPORT_SYMBOL_GPL(vsock_deliver_tap); > -- > 2.9.3 >