]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses
authorPaul Mackerras <paulus@samba.org>
Wed, 3 May 2006 13:02:04 +0000 (23:02 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 3 May 2006 13:06:46 +0000 (23:06 +1000)
commit038b33ce28bdc7b4cd026babba784c79e1b4d080
treeaf13455be2b53f11fbbfec0305731b452db396a2
parentd26a6a3dc7611da55ad26c9c018e9e485535af01
powerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses

We have a case where __get_user and __put_user can validly be used
on kernel addresses in interrupt context - namely, the alignment
exception handler, as our get/put_unaligned just do a single access
and rely on the alignment exception handler to fix things up in the
rare cases where the cpu can't handle it in hardware.  Thus we can
get alignment exceptions in the network stack at interrupt level.
The alignment exception handler does a __get_user to read the
instruction and blows up in might_sleep().

Since a __get_user on a kernel address won't actually ever sleep,
this makes the might_sleep conditional on the address being less
than PAGE_OFFSET.

Signed-off-by: Paul Mackerras <paulus@samba.org>
include/asm-powerpc/uaccess.h