]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
virtio-net: fix leaking page for gso packet during mergeable XDP
authorJason Wang <jasowang@redhat.com>
Tue, 22 May 2018 03:44:31 +0000 (11:44 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 5 Sep 2018 08:30:45 +0000 (10:30 +0200)
commit5cf0b8a6a92a601a362efa1dc47004ea83b73fb9
tree16edceee4b3b947f6f9da345bc826806a35405e6
parent99e52e1c04935283f7c51948fca29530ada6b93f
virtio-net: fix leaking page for gso packet during mergeable XDP

BugLink: http://bugs.launchpad.net/bugs/1789666
[ Upstream commit 3d62b2a0db505bbf9ed0755f254e45d775f9807f ]

We need to drop refcnt to xdp_page if we see a gso packet. Otherwise
it will be leaked. Fixing this by moving the check of gso packet above
the linearizing logic. While at it, remove useless comment as well.

Cc: John Fastabend <john.fastabend@gmail.com>
Fixes: 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/virtio_net.c