Re: [PATCH v2] iommu/amd: RCU-protect iommu_ga_log_notifier

From: Vasant Hegde

Date: Mon Nov 23 2026 - 03:33:41 EST




On 11/17/2026 8:00 AM, lirongqing wrote:
> From: Li RongQing <lirongqing@xxxxxxxxx>
>
> iommu_poll_ga_log() accesses iommu_ga_log_notifier without an RCU
> read-side critical section, so synchronize_rcu() in the unregister
> path does not wait for an in-flight notifier callback.
>
> Use rcu_assign_pointer() when updating the notifier and
> rcu_dereference() under rcu_read_lock() when invoking it. Load the
> pointer once so the NULL check and the call observe the same value.

Applied, thanks!

-Vasant