From: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp> Date: Mon, 3 Dec 2018 18:09:24 +0900
> In tun.c skb->len was accessed while doing stats accounting after a > call to netif_receive_skb. We can not access skb after this call > because buffers may be dropped. > > The fix for this bug would be to store skb->len in local variable and > then use it after netif_receive_skb(). IMO using xdp data size for > accounting bytes will be better because input for tun_xdp_one() is > xdp_buff. > > Hence this patch: > - fixes a bug by removing skb access after netif_receive_skb() > - uses xdp data size for accounting bytes ... > Fixes: 043d222f93ab ("tuntap: accept an array of XDP buffs through sendmsg()") > Reviewed-by: Toshiaki Makita <makita.toshi...@lab.ntt.co.jp> > Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp> > Acked-by: Jason Wang <jasow...@redhat.com> > --- > v1 -> v2: > No change. Reposted due to patchwork status. Applied, thanks.