Re: [PATCH] futex: Fix fault_in_user_writeable()

From: Davidlohr Bueso
Date: Mon Aug 16 2021 - 14:28:03 EST

On Mon, 16 Aug 2021, Huacai Chen wrote:

fault_in_user_writeable() should verify R/W access but only verify W. In
most archs W implies R, but not true in MIPS and LoongArch, so fix it.

Yuck for a find_vma() in futex.c. If this is a problem in MIPS, shouldn't
the fix be there? Furthermore it's stated that fault_in_user_writeable():

"Fault in user address and verify RW access"

And you guys seem to have proposed it already: