Re: [PATCH net] tun: remove skb access after netif_receive_skb

2018-12-03 Thread Jason Wang
On 2018/11/30 下午1:29, Toshiaki Makita wrote: On 2018/11/30 11:40, Jason Wang wrote: On 2018/11/30 上午10:30, Prashant Bhole wrote: 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

Re: [PATCH net] tun: remove skb access after netif_receive_skb

2018-11-29 Thread Toshiaki Makita
On 2018/11/30 11:40, Jason Wang wrote: > On 2018/11/30 上午10:30, Prashant Bhole wrote: >> 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

Re: [PATCH net] tun: remove skb access after netif_receive_skb

2018-11-29 Thread Jason Wang
On 2018/11/30 上午10:30, Prashant Bhole wrote: 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

[PATCH net] tun: remove skb access after netif_receive_skb

2018-11-29 Thread Prashant Bhole
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