]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_net: split out ctrl buffer
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 19 Apr 2018 05:30:48 +0000 (08:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Apr 2018 20:33:20 +0000 (16:33 -0400)
commit86b52b64eb0d2a4f4ebecafb6c1e3b1465bbd24a
tree0a5bede2fd2c9304c7a5c861b802466bcebff509
parent2ae630d52b7b07200c80b46a6cfafa27a3211b0d
virtio_net: split out ctrl buffer

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>
drivers/net/virtio_net.c