Re: [PATCH v2 02/12] rv: Fix read_lock scope in per-task DA cleanup

From: Gabriele Monaco

Date: Fri May 29 2026 - 02:09:26 EST


On Thu, 2026-05-28 at 10:43 +0200, Nam Cao wrote:
> Gabriele Monaco <gmonaco@xxxxxxxxxx> writes:
> > The da_monitor_reset_all() function for per-task monitors takes
> > tasklist_lock while iterating over tasks, then keeps it also while
> > iterating over idle tasks (one per CPU). The latter is not
> > necessary
> > since the lock needs to guard only for_each_process_thread().
> >
> > Use a scoped_guard for more compact syntax and adjust the scope
> > only
> > where the lock is necessary.
> >
> > Fixes: 30984ccf31b7f ("rv: Refactor da_monitor to minimise macros")
> > Fixes: 8259cb14a7068 ("rv: Reset per-task monitors also for idle
> > tasks")
>
> Fixes: tag "indicates that the patch fixes a bug in a previous
> commit". There is no bug here, so I don't think Fixes tags are
> applicable.

Yeah good point, that isn't a real bug.. We're just holding a lock for
a bit too long but there's no harm in that. Will remove the tags.

Thanks,
Gabriele

>
> > Reviewed-by: Wen Yang <wen.yang@xxxxxxxxx>
> > Signed-off-by: Gabriele Monaco <gmonaco@xxxxxxxxxx>
>
> Reviewed-by: Nam Cao <namcao@xxxxxxxxxxxxx>