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

From: Qian Cai
Date: Sat May 02 2020 - 00:12:29 EST




> On May 1, 2020, at 11:32 PM, Eric Dumazet <eric.dumazet@xxxxxxxxx> 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 applied this patch, the leaks went away. It could be the fuzzers do not always reproduce the leaks or it could be that call_rcu() in skb_dst_drop() takes a long time waiting for grace periods which may confuse kmemleak because skb has already gone.