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

Arnd Bergmann arnd at arndb.de
Fri Mar 11 06:54:36 EST 2005


I currently get warnings from futex resulting from Olofs futex+rwsem fix
combined with the fact that ppc64 __copy_from_user has a might_sleep
check in it:

[ 9607.577071] Debug: sleeping function called from invalid context at include2/asm/uaccess.h:2
28
[ 9607.676181] in_atomic():1, irqs_disabled():0
[ 9607.724741] Call Trace:
[ 9607.752058] [c00000000d68fab0] [c000000001f0fb80] 0xc000000001f0fb80 (unreliable)
[ 9607.835030] [c00000000d68fb30] [c000000000042420] .__might_sleep+0xf8/0x108
[ 9607.912936] [c00000000d68fbd0] [c00000000006ac34] .do_futex+0x224/0x858

The fix is to do the check only in copy_*_user, not __copy_*_user. This is the
same that most other architectures do.

Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
 arch/ppc64/lib/usercopy.c   |    2 ++
 include/asm-ppc64/uaccess.h |    6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uaccess-might-sleep.diff
Type: text/x-diff
Size: 2392 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050310/78bb7edf/attachment.diff 


More information about the Linuxppc64-dev mailing list