From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <chleroy@kernel.org>,
Shrikanth Hegde <sshegde@linux.ibm.com>, Qian Cai <cai@lca.pw>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH] powerpc/iommu: Fix an RCU read lock leak in mm_iommu_is_devmem()
Date: Tue, 27 Oct 2026 06:43:59 +0530 [thread overview]
Message-ID: <bj8g54iw.ritesh.list@gmail.com> (raw)
In-Reply-To: <56f0c45723ee53149a21ceb599010e957457afd8.1793044370.git.bvanassche@acm.org>
Bart Van Assche <bvanassche@acm.org> 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.list@gmail.com/
-ritesh
prev parent reply other threads:[~2026-10-27 1:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 19:52 Bart Van Assche
2026-10-26 20:27 ` Markus Elfring
2026-10-26 20:33 ` Bart Van Assche
2026-10-27 1:13 ` Ritesh Harjani [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bj8g54iw.ritesh.list@gmail.com \
--to=ritesh.list@gmail.com \
--cc=bvanassche@acm.org \
--cc=cai@lca.pw \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=sshegde@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®