alignment exceptionhandler sleeps in invalid context
Michael Ellerman
michael at ellerman.id.au
Sat Apr 29 12:34:13 EST 2006
On Fri, 2006-04-28 at 21:02 +1000, Paul Mackerras wrote:
> Olaf Hering writes:
>
> > I'm not sure where the bug is. Does it mean the network stack does
> > something nasty, or is the exception handler itself broken? (probably the latter)
> > This is 2.6.16.9 on a p270.
>
> This patch should fix it, I hope. If you can verify that it fixes it
> I'll send it to Linus.
>
> Paul.
>
> diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h
> index 3872e92..b02d858 100644
> --- a/include/asm-powerpc/uaccess.h
> +++ b/include/asm-powerpc/uaccess.h
> @@ -179,7 +179,8 @@ do { \
> #define __put_user_nocheck(x, ptr, size) \
> ({ \
> long __pu_err; \
> - might_sleep(); \
> + if ((unsigned long)ptr < PAGE_OFFSET) \
> + might_sleep(); \
+ if (!is_kernel_addr((unsigned long)ptr)) \
+ might_sleep(); \
In asm/page.h :)
cheers
--
Michael Ellerman
IBM OzLabs
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060429/f151cd80/attachment.pgp>
More information about the Linuxppc-dev
mailing list