From: Jason Wang Date: Wed, 3 Sep 2014 06:25:30 +0000 (+0800) Subject: vhost_net: init acked_features to backend_features X-Git-Tag: qemu-xen-4.6.0-rc1~220^2~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b49ae9138d5cadb47fb868297fbcdac8292fb666;p=qemu-xen.git vhost_net: init acked_features to backend_features commit 2e6d46d77ed328d34a94688da8371bcbe243479b (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 Cc: Nikolay Nikolaev Cc: qemu-stable@nongnu.org Signed-off-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 3819044b02..b21e7a434f 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -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); }