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)
commit303fd71b37fb710b26f5ff5444029d62cfd627bd
tree293b96678dda7f617ccf9a8e167f4ac977f3a17c
parentab7e34b3431c5d29817c503ad4d3bf2732f92ad3
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: c67df11f6e480 ("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