Skip to content

virtio-net: fix pages leaking when building skb in big mode

Laurent Vivier requested to merge lvivier/centos-stream-9:BZ2042559 into main

Bugzilla: http://bugzilla.redhat.com/2042559

commit afd92d82c9d715fb97565408755acad81573591a Author: Jason Wang jasowang@redhat.com Date: Fri Sep 17 16:34:06 2021 +0800

virtio-net: fix pages leaking when building skb in big mode

We try to use build_skb() if we had sufficient tailroom. But we forget
to release the unused pages chained via private in big mode which will
leak pages. Fixing this by release the pages after building the skb in
big mode.

Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Fixes: fb32856b16ad ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Laurent Vivier lvivier@redhat.com

Edited by Bandan Das

Merge request reports