mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] vhost: correct misleading printing information
@ 2024-03-11  8:21 Xianting Tian
  2024-03-15  7:53 ` Xianting Tian
  0 siblings, 1 reply; 2+ messages in thread
From: Xianting Tian @ 2024-03-11  8:21 UTC (permalink / raw)
  To: mst, jasowang; +Cc: kvm, virtualization, netdev, linux-kernel, 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 <xianting.tian@linux.alibaba.com>
---
 drivers/vhost/vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 045f666b4f12..1f3604c79394 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -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;
 		}
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] vhost: correct misleading printing information
  2024-03-11  8:21 [PATCH] vhost: correct misleading printing information Xianting Tian
@ 2024-03-15  7:53 ` Xianting Tian
  0 siblings, 0 replies; 2+ messages in thread
From: Xianting Tian @ 2024-03-15  7:53 UTC (permalink / raw)
  To: mst, jasowang; +Cc: kvm, virtualization, netdev, linux-kernel

it is a very minor fix, I think it can be applied

在 2024/3/11 下午4:21, 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 <xianting.tian@linux.alibaba.com>
> ---
>   drivers/vhost/vhost.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 045f666b4f12..1f3604c79394 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -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;
>   		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-15  7:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-11  8:21 [PATCH] vhost: correct misleading printing information Xianting Tian
2024-03-15  7:53 ` Xianting Tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®