]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/net/virtio_net.c
virtio_net: split out ctrl buffer
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 19 Apr 2018 05:30:48 +0000 (08:30 +0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Tue, 12 Jun 2018 06:28:55 +0000 (02:28 -0400)
commit603343b9a70072f4ae892a11c11567d25a191344
tree4e1bc8aafea0833f38f5224a7e168325d6e169fe
parentf01d718bc240c6b9ee5d5939ed65cd10239c86ee
virtio_net: split out ctrl buffer

BugLink: http://bugs.launchpad.net/bugs/1775483
[ Upstream commit 12e571693837d6164bda61e316b1944972ee0d97 ]

When sending control commands, virtio net sets up several buffers for
DMA. The buffers are all part of the net device which means it's
actually allocated by kvmalloc so it's in theory (on extreme memory
pressure) possible to get a vmalloc'ed buffer which on some platforms
means we can't DMA there.

Fix up by moving the DMA buffers into a separate structure.

Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-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: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/virtio_net.c