vhost: fix message payload union in setting ring address
vhost_user_set_vring_addr() uses the msg->payload.addr union member, not msg->payload.state. Luckily the offset of the 'index' field is identical in both structs, so there was never any buggy behavior. Fixes: 5cd690e4fda9 ("vhost: fix vring addresses not translated") Cc: stable@dpdk.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
f83e0199c8
commit
55659ed3ed
@ -517,7 +517,7 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, VhostUserMsg *msg)
|
||||
|
||||
if (vq->enabled && (dev->features &
|
||||
(1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) {
|
||||
dev = translate_ring_addresses(dev, msg->payload.state.index);
|
||||
dev = translate_ring_addresses(dev, msg->payload.addr.index);
|
||||
if (!dev)
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user