Re: [PATCH] net: fix memory leaks in flush_backlog() with RPS

2020-05-01 Thread Qian Cai
> On May 1, 2020, at 11:32 PM, Eric Dumazet wrote: > > kfree_skb() is supposed to call skb_dst_drop() (look in > skb_release_head_state()) > > If you think about it, we would have hundreds of similar bugs if this was not > the case. Thanks for quick response. Funny thing is that once I app

Re: [PATCH] net: fix memory leaks in flush_backlog() with RPS

2020-05-01 Thread Eric Dumazet
On 5/1/20 8:15 PM, Qian Cai wrote: > netif_receive_skb_list_internal() could call enqueue_to_backlog() to put > some skb to softnet_data.input_pkt_queue and then in > ip_route_input_slow(), it allocates a dst_entry to be used in > skb_dst_set(). Later, > > cleanup_net > default_device_exit_ba

[PATCH] net: fix memory leaks in flush_backlog() with RPS

2020-05-01 Thread Qian Cai
netif_receive_skb_list_internal() could call enqueue_to_backlog() to put some skb to softnet_data.input_pkt_queue and then in ip_route_input_slow(), it allocates a dst_entry to be used in skb_dst_set(). Later, cleanup_net default_device_exit_batch unregister_netdevice_many rollback_reg