Re: [PATCH v3] vduse: Add suspend
From: Eugenio Perez Martin
Date: Thu Jun 11 2026 - 05:32:06 EST
On Thu, Jun 11, 2026 at 11:20 AM Dan Carpenter <error27@xxxxxxxxx> wrote:
>
> On Thu, Jun 11, 2026 at 05:03:24AM -0400, Michael S. Tsirkin wrote:
> > On Thu, Jun 11, 2026 at 10:18:51AM +0300, Dan Carpenter wrote:
> > > Hi Eugenio,
> > >
> > > kernel test robot noticed the following build warnings:
> > >
> > > https://git-scm.com/docs/git-format-patch#_base_tree_information]
> > >
> > > url: https://github.com/intel-lab-lkp/linux/commits/Eugenio-P-rez/vduse-Add-suspend/20260610-164534
> > > base: next-20260609
> > > patch link: https://lore.kernel.org/r/20260610083452.477759-1-eperezma%40redhat.com
> > > patch subject: [PATCH v3] vduse: Add suspend
> > > config: arm64-randconfig-r072-20260610 (https://download.01.org/0day-ci/archive/20260611/202606111115.tKKe1qCE-lkp@xxxxxxxxx/config)
> > > compiler: aarch64-linux-gcc (GCC) 8.5.0
> > > smatch: v0.5.0-9185-gbcc58b9c
> > >
> > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > the same patch/commit), kindly add following tags
> > > | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > > | Reported-by: Dan Carpenter <error27@xxxxxxxxx>
> > > | Closes: https://lore.kernel.org/r/202606111115.tKKe1qCE-lkp@xxxxxxxxx/
> > >
> > > smatch warnings:
> > > drivers/vdpa/vdpa_user/vduse_dev.c:577 vduse_vq_kick() warn: inconsistent returns '&vq->kick_lock'.
> > > drivers/vdpa/vdpa_user/vduse_dev.c:1302 vduse_dev_queue_irq_work() warn: inconsistent returns '&dev->rwsem'.
> > >
> > > vim +577 drivers/vdpa/vdpa_user/vduse_dev.c
> > >
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 562 static void vduse_vq_kick(struct vduse_virtqueue *vq)
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 563 {
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 564 spin_lock(&vq->kick_lock);
> > > ^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 565 if (!vq->ready)
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 566 goto unlock;
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 567
> > > 9c4307e82fa1dc Eugenio Pérez 2026-06-10 568 guard(rwsem_read)(&vq->dev->rwsem);
> > > 9c4307e82fa1dc Eugenio Pérez 2026-06-10 569 if (vq->dev->suspended)
> > > 9c4307e82fa1dc Eugenio Pérez 2026-06-10 570 return;
> > >
> > > unlock before returning?
> > >
> > > 9c4307e82fa1dc Eugenio Pérez 2026-06-10 571
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 572 if (vq->kickfd)
> > > 3652117f854819 Christian Brauner 2023-11-22 573 eventfd_signal(vq->kickfd);
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 574 else
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 575 vq->kicked = true;
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 576 unlock:
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 @577 spin_unlock(&vq->kick_lock);
> > > c8a6153b6c59d9 Xie Yongji 2021-08-31 578 }
> >
> >
> > I think this is fixed by:
> >
> > commit e4a249d15eb2d4b28213bebb1eefaf2e6d99de0b (HEAD -> vhost, linux-next-vhost/linux-next, kernel.org/vhost, kernel.org/test)
> > Author: Nathan Chancellor <nathan@xxxxxxxxxx>
> > Date: Wed Jun 10 12:16:49 2026 -0700
> >
> > vduse: Fix error around jumping over a __cleanup() variable
> >
> > right?
>
> These things haven't hit linux-next yet. I found the email.
> https://lore.kernel.org/all/20260610-vduse_vq_kick-fix-guard-usage-v1-1-0ce02c08006e@xxxxxxxxxx/
>
> That only fixes the bug in vduse_vq_kick(), not the bug in
> vduse_dev_queue_irq_work(). I don't see a fix for that
> yet on lore but I may have missed it.
>
No, I can test & send a fast patch for that.
Thanks!