Re: [PATCH net v2] net: ethernet: mtk_eth_soc: fix memory leak in LRO rings release
From: Felix Fietkau
Date: Mon Aug 12 2024 - 11:34:51 EST
On 12.08.24 17:21, Elad Yifee wrote:
For LRO we allocate more than one page, yet 'skb_free_frag' is used
to free the buffer, which only frees a single page.
Fix it by using 'free_pages' instead.
Fixes: 2f2c0d2919a1 ("net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag")
Signed-off-by: Elad Yifee <eladwf@xxxxxxxxx>
Are you sure about this change? From what I can see, the LRO buffer is
(or at least should be) allocated as a compound page. Because of that,
skb_free_frag should work on it. If it doesn't, wouldn't we run into the
same issue when the network stack frees received packets?
- Felix