Skip to content

Commit

Permalink
vhost_net: init acked_features to backend_features
Browse files Browse the repository at this point in the history
commit 2e6d46d (vhost: add
vhost_get_features and vhost_ack_features) removes the step that
initializes the acked_features to backend_features.

As this field is now uninitialized, vhost initialization will sometimes
fail.

To fix, initialize acked_features on each ack.

Tested-by: Andrey Korolyov <andrey@xdel.ru>
Cc: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
jasowang authored and mstsirkin committed Sep 3, 2014
1 parent cd7d1d2 commit b49ae91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/net/vhost_net.c
Expand Up @@ -115,6 +115,7 @@ unsigned vhost_net_get_features(struct vhost_net *net, unsigned features)

void vhost_net_ack_features(struct vhost_net *net, unsigned features)
{
net->dev.acked_features = net->dev.backend_features;
vhost_ack_features(&net->dev, vhost_net_get_feature_bits(net), features);
}

Expand Down

0 comments on commit b49ae91

Please sign in to comment.