]> 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)
commitc138988a3b7ac81dd0c2c3c6d01c783c9e77eec7
tree0a5bede2fd2c9304c7a5c861b802466bcebff509
parent3322f27dab0870694f92516af58b9ff92e668dc0
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