]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: fix pages leaking when building skb in big mode
authorJason Wang <jasowang@redhat.com>
Fri, 17 Sep 2021 08:34:06 +0000 (16:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Sep 2021 11:10:26 +0000 (12:10 +0100)
commit868c27182cef8c7e5c0196efb6570692e30a7a9f
tree4bce793d193f1e55ec265c6a8379adb65b1ad0a1
parentc41a78c45d4b0a77f07e8ad650651b9e7c4dfadd
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: e5080fbc9738 ("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>
drivers/net/virtio_net.c