Bart Van Assche <[email protected]> writes:

> mm_iommu_is_devmem() returns true from inside its RCU read-side
> critical section without calling rcu_read_unlock(). Neither caller,
> iommu_tce_xchg_no_kill() nor tce_page_is_contained(), drops the RCU
> read lock, so every successful lookup leaks one RCU read lock. Fix this
> by calling rcu_read_unlock() before returning true. The pointer to the
> list element is not used after the RCU read lock is dropped.
>
> Fixes: b5952f8125ae ("powerpc/mm/book3s64/iommu: fix some RCU-list locks")

Thanks Bart, but this was caught as part of Clang's context analysis
work on powerpc.  It is already posted here [1]. Could you review that
instead?

[1]: 
https://lore.kernel.org/linuxppc-dev/04e4dafde56fe4b055fbd763dc0e119862073c6d.1790590014.git.ritesh.l...@gmail.com/

-ritesh

Reply via email to