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)
commit12e571693837d6164bda61e316b1944972ee0d97
tree0a5bede2fd2c9304c7a5c861b802466bcebff509
parentf4ea89110df237da6fbcaab76af431e85f07d904
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