vhost: correct misleading printing information
Subsystems (5)
PATCH 1/1 vhost: correct misleading printing information
Guest moved avail idx not used idx when we need to print log if '(vq->avail_idx - last_avail_idx) > vq->num', so fix it.
Signed-off-by Xianting Tian <[email protected]>
--- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vhost/vhost.c +1 -1
@@ -2515,7 +2515,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, vq->avail_idx =vhost16_to_cpu (vq, avail_idx);if (unlikely ((u16)(vq->avail_idx - last_avail_idx) > vq->num)) { -vq_err (vq,"Guest moved used index from %u to %u" , +vq_err (vq,"Guest moved avail index from %u to %u" , last_avail_idx, vq->avail_idx);return -EFAULT ; }
Signature · 1 line
2.17.1
it is a very minor fix, I think it can be applied
Quoted 21 lines · Xianting Tian
Guest moved avail idx not used idx when we need to print log if '(
vq->avail_idx-last_avail_idx) >vq->num', so fix it.Signed-off-by Xianting Tian <[email protected]>--- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vhost/vhost.c +1
-1@@ -2515,7 +2515,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, vq->avail_idx =vhost16_to_cpu (vq, avail_idx);if (unlikely ((u16)(vq->avail_idx - last_avail_idx) > vq->num)) { -vq_err (vq,"Guest moved used index from %u to %u" , +vq_err (vq,"Guest moved avail index from %u to %u" , last_avail_idx, vq->avail_idx);return -EFAULT ; }