]> git.baikalelectronics.ru Git - kernel.git/commit
vhost_net: keep private_data and rx_ring synced
authorJason Wang <jasowang@redhat.com>
Fri, 9 Mar 2018 06:50:33 +0000 (14:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Mar 2018 17:02:59 +0000 (12:02 -0500)
commit70bd98104f721ffe4ea3e0672bbcd1df33d3a570
tree293b96678dda7f617ccf9a8e167f4ac977f3a17c
parent0c02da38b6d60e8ab2cc3b4a6ae18ab6bd0b9c66
vhost_net: keep private_data and rx_ring synced

We get pointer ring from the exported sock, this means we should keep
rx_ring and vq->private synced during both vq stop and backend set,
otherwise we may see stale rx_ring.

Fixes: 7243bf5ae9fdc ("vhost_net: try batch dequing from skb array")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c