Re: [PATCH v9 5/6] vduse: add vq group asid support
From: Michael S. Tsirkin
Date: Wed Nov 19 2025 - 04:32:28 EST
On Wed, Nov 19, 2025 at 10:26:43AM +0100, Eugenio Perez Martin wrote:
> > But this is not the logic that is
> > implemented in this patch as there's no synchronize_rcu() in the
> > vduse_set_group_asid_nomsg().
>
> We only set the pointer on the writer's side, we do nothing like
> freeing resources. Should we set the pointer before or after
> syncrhonize_rcu()?
synchronize_rcu is called after writer makes it's changes.
> What do we need to do on the other side of
> syncrhonize_rcu()?
Presumably, return so the caller knows the as has been updated.
However, user-triggerable synchronize_rcu() is almost always a bug.
If that's what is going on, you want srcu.
--
MST