[PATCH] ppc64: kill might_sleep() warnings in __copy_*_user_inatomic

Olof Johansson olof at austin.ibm.com
Sat Mar 12 07:30:44 EST 2005

On Fri, Mar 11, 2005 at 12:45:37PM +0100, Arnd Bergmann wrote:
> On Freedag 11 März 2005 00:39, Olof Johansson wrote:
> > Actually, I think I would prefer the following. It renames current
> > __copy_{to,from}_user to __copy_{to,from}_user_inatomic, adds the
> > old ones as inlines doing the  might_sleep() and calling the inatomics
> > afterwards. This way the calls to __copy_{to,from}_user() will be caught
> > if called under lock or preemption as well. This is also how i386 does it.
> Yes, that solution is better than mine. However, you missed the case where
> __copy_{to,from}_user_inatomic calls __{get,put}_user_size, which in turn
> does might_sleep(). I now changed the {get,put}_user path accordingly.
> I have checked that this version boots and does not warn about futex.

Doh! Great, thanks.

> ---
> This implements the __copy_{to,from}_user_inatomic() functions on ppc64.
> The only difference between the inatomic and regular version is that
> inatomic does not call might_sleep() to detect possible faults while
> holding locks/elevated preempt counts.
> Signed-off-by: Olof Johansson <olof at austin.ibm.com>
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>

Acked-by: Olof Johansson <olof at austin.ibm.com>

More information about the Linuxppc64-dev mailing list