When head_frag is true we have page in the SKB head. So, for devm managed page we need to inform the device driver through callback.
Signed-off-by: Ujjal Roy <royuj...@gmail.com> --- net/core/skbuff.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c8cd99c3603f..0d303e694efa 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -582,10 +582,16 @@ static void skb_free_head(struct sk_buff *skb) { unsigned char *head = skb->head; - if (skb->head_frag) + if (skb->head_frag) { + struct page *page = virt_to_head_page(head); + + if (put_devmap_managed_page(page)) + return; + skb_free_frag(head); - else + } else { kfree(head); + } } static void skb_release_data(struct sk_buff *skb) -- 2.11.0