Commit 21818ed0 authored by YueHaibing's avatar YueHaibing Committed by Michael S. Tsirkin

vdpasim: Return status in vdpasim_get_status

vdpasim->status should acquired under spin lock.

Fixes: 870448c31775 ("vdpasim: vDPA device simulator")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200402024916.35192-1-yuehaibing@huawei.comSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent cf29b1ce
......@@ -488,7 +488,7 @@ static u8 vdpasim_get_status(struct vdpa_device *vdpa)
status = vdpasim->status;
spin_unlock(&vdpasim->lock);
return vdpasim->status;
return status;
}
static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment