Re: [PATCH] mm/mmu_notifiers: Use hlist_for_each_entry_srcu() for SRCU list traversal

From: SeongJae Park

Date: Wed Feb 04 2026 - 20:47:44 EST


On Wed, 4 Feb 2026 03:09:37 -0500 lirongqing <lirongqing@xxxxxxxxx> wrote:

> From: Li RongQing <lirongqing@xxxxxxxxx>
>
> The mmu_notifier_subscriptions list is protected by SRCU. While the
> current code uses hlist_for_each_entry_rcu() with an explicit SRCU
> lockdep check, it is more appropriate to use the dedicated
> hlist_for_each_entry_srcu() macro.
>
> This change aligns the code with the preferred kernel API for SRCU-protected
> lists, improving code clarity and ensuring that the synchronization
> method is explicitly documented by the iterator name itself.
>
> Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>

Acked-by: SeongJae Park <sj@xxxxxxxxxx>


Thanks,
SJ

[...]