public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman•id.au>
To: Paul Mackerras <paulus@samba•org>
Cc: linuxppc-dev@ozlabs•org, Olaf Hering <olh@suse•de>
Subject: Re: alignment exceptionhandler sleeps in invalid context
Date: Sat, 29 Apr 2006 12:34:13 +1000	[thread overview]
Message-ID: <1146278053.14733.8.camel@localhost.localdomain> (raw)
In-Reply-To: <17489.63055.968862.256370@cargo.ozlabs.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

  parent reply	other threads:[~2006-04-29  2:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 17:32 alignment exceptionhandler sleeps in invalid context Olaf Hering
2006-04-24 23:12 ` Paul Mackerras
2006-04-28 11:02 ` Paul Mackerras
2006-04-28 11:19   ` Olaf Hering
2006-04-28 14:22     ` Kumar Gala
2006-04-28 23:41       ` Paul Mackerras
2006-04-29  2:34   ` Michael Ellerman [this message]
2006-05-02  4:00   ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1146278053.14733.8.camel@localhost.localdomain \
    --to=michael@ellerman$(echo .)id.au \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=olh@suse$(echo .)de \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox