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

Arnd Bergmann arnd at arndb.de
Fri Mar 11 22:45:37 EST 2005

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.

      Arnd <><

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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uaccess-might-sleep-3.diff
Type: text/x-diff
Size: 3367 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050311/57d29cec/attachment.diff 

More information about the Linuxppc64-dev mailing list