Skip to content
Commit 5fade3bb authored by Ryan Roberts's avatar Ryan Roberts
Browse files

mm/userfaultfd: UFFDIO_MOVE implementation should use ptep_get()



Commit c33c7948 ("mm: ptep_get() conversion") converted all
(non-arch) call sites to use ptep_get() instead of doing a direct
dereference of the pte. Full rationale can be found in that commit's
log.

Since then, UFFDIO_MOVE has been implemented which does 7 direct pte
dereferences. Let's fix those up to use ptep_get().

I've asserted in the past that there is no reliable automated mechanism
to catch these; I'm relying on a combination of Coccinelle (which throws
up a lot of false positives) and some compiler magic to force a compiler
error on dereference. But given the frequency with which new issues are
coming up, I'll add it to my todo list to try to find an automated
solution.

Fixes: adef4406 ("userfaultfd: UFFDIO_MOVE uABI")
Signed-off-by: Ryan Roberts's avatarRyan Roberts <ryan.roberts@arm.com>
parent 6613476e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment