On 7/15/24 15:49, Alexander Ivanov wrote:
Set the index variable to zero before passing its pointer to xa_find().

Fixes: 17ad03ac78b9 ("drivers/vhost: fix missing rcu_read_lock in 
vhost_work_queue")
https://virtuozzo.atlassian.net/browse/PSBM-157296
Signed-off-by: Alexander Ivanov <alexander.iva...@virtuozzo.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 c551e8d215b6..1eac6e2f62a5 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -258,7 +258,7 @@ static bool vhost_worker_queue(struct vhost_worker *worker,
  bool vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work)
  {
        struct vhost_worker *worker;
-       unsigned long i;
+       unsigned long i = 0;
worker = xa_find(&dev->worker_xa, &i, ULONG_MAX, XA_PRESENT);
        if (!worker)
Please also include this into upcoming RK with VStorage fix
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to