Skip to content

Commit 0379654

Browse files
netoptimizerkuba-moo
authored andcommitted
xen-netfront: Add missing skb_mark_for_recycle
Notice that skb_mark_for_recycle() is introduced later than fixes tag in commit 6a5bcd8 ("page_pool: Allow drivers to hint on SKB recycling"). It is believed that fixes tag were missing a call to page_pool_release_page() between v5.9 to v5.14, after which is should have used skb_mark_for_recycle(). Since v6.6 the call page_pool_release_page() were removed (in commit 535b9c6 ("net: page_pool: hide page_pool_release_page()") and remaining callers converted (in commit 6bfef2e ("Merge branch 'net-page_pool-remove-page_pool_release_page'")). This leak became visible in v6.8 via commit dba1b8a ("mm/page_pool: catch page_pool memory leaks"). Cc: [email protected] Fixes: 6c5aa6f ("xen networking: add basic XDP support for xen-netfront") Reported-by: Leonidas Spyropoulos <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=218654 Reported-by: Arthur Borsboom <[email protected]> Signed-off-by: Jesper Dangaard Brouer <[email protected]> Link: https://lore.kernel.org/r/171154167446.2671062.9127105384591237363.stgit@firesoul Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fa84513 commit 0379654

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/xen-netfront.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue)
285285
return NULL;
286286
}
287287
skb_add_rx_frag(skb, 0, page, 0, 0, PAGE_SIZE);
288+
skb_mark_for_recycle(skb);
288289

289290
/* Align ip header to a 16 bytes boundary */
290291
skb_reserve(skb, NET_IP_ALIGN);

0 commit comments

Comments
 (0)