On Mon, Jan 12, 2026 at 12:56:34PM +0100, Eugenio Perez Martin wrote:
> > > @@ -439,11 +453,14 @@ static __poll_t vduse_dev_poll(struct file *file, 
> > > poll_table *wait)
> > >  static void vduse_dev_reset(struct vduse_dev *dev)
> > >  {
> > >       int i;
> > > -     struct vduse_iova_domain *domain = dev->domain;
> > >
> > >       /* The coherent mappings are handled in vduse_dev_free_coherent() */
> > > -     if (domain && domain->bounce_map)
> > > -             vduse_domain_reset_bounce_map(domain);
> > > +     for (i = 0; i < dev->nas; i++) {
> > > +             struct vduse_iova_domain *domain = dev->as[i].domain;
> >
> > I do not understand the locking here an in many other places.
> > dev->as is dereferenced here apparently outside as_lock?
> >
> 
> The virtqueue groups' "as_lock" member protects the virtqueue groups'
> "as" pointer. But we're not accessing any vq groups "as" member here,
> we're accessing the dev->as[i].domain pointer here, which doesn't
> change in all the lifetime of the device.

Ah. got it. maybe a comment near the field definition will help.


Reply via email to