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

From: Nam Cao

Date: Thu May 28 2026 - 04:48:56 EST


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.

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

Reviewed-by: Nam Cao <namcao@xxxxxxxxxxxxx>