All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Fabio Massimo Di Nitto <fabbione@ubuntu.com>
Cc: linuxppc-dev@ozlabs.org, Jeff Bailey <jbailey@ubuntu.com>,
	Paul Mackerras <paulus@samba.org>,
	Ben Collins <ben.collins@ubuntu.com>
Subject: Re: glibc-2.5 test suite hangs/crashes the machine
Date: Mon, 30 Oct 2006 14:02:13 +1100	[thread overview]
Message-ID: <1162177334.25682.144.camel@localhost.localdomain> (raw)
In-Reply-To: <45419F79.2020300@ubuntu.com>

Does that patch fixes it ?

Index: linux-work/arch/powerpc/kernel/traps.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/traps.c	2006-10-23 14:41:37.000000000 +1000
+++ linux-work/arch/powerpc/kernel/traps.c	2006-10-30 13:59:41.000000000 +1100
@@ -843,7 +843,7 @@ void __kprobes program_check_exception(s
 
 void alignment_exception(struct pt_regs *regs)
 {
-	int fixed = 0;
+	int sig, fixed = 0;
 
 	/* we don't implement logging of alignment exceptions */
 	if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS))
@@ -856,15 +856,11 @@ void alignment_exception(struct pt_regs 
 	}
 
 	/* Operand address was bad */
-	if (fixed == -EFAULT) {
-		if (user_mode(regs))
-			_exception(SIGSEGV, regs, SEGV_ACCERR, regs->dar);
-		else
-			/* Search exception table */
-			bad_page_fault(regs, regs->dar, SIGSEGV);
-		return;
-	}
-	_exception(SIGBUS, regs, BUS_ADRALN, regs->dar);
+	sig = fixed == -EFAULT ? SIGSEGV : SIGBUS;
+	if (user_mode(regs))
+		_exception(sig, regs, SEGV_ACCERR, regs->dar);
+	else
+		bad_page_fault(regs, regs->dar, sig);
 }
 
 void StackOverflow(struct pt_regs *regs)

  parent reply	other threads:[~2006-10-30  3:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-27  5:56 glibc-2.5 test suite hangs/crashes the machine Fabio Massimo Di Nitto
2006-10-27 16:22 ` Jeff Bailey
2006-10-30  1:47   ` Benjamin Herrenschmidt
2006-11-01 22:17     ` Steve Munroe
2006-11-01 22:35       ` Benjamin Herrenschmidt
2006-11-01 22:56         ` Steve Munroe
2006-11-01 23:22           ` Benjamin Herrenschmidt
2006-10-30  3:02 ` Benjamin Herrenschmidt [this message]
2006-10-30 11:35   ` Fabio Massimo Di Nitto
2006-10-30 20:36     ` Benjamin Herrenschmidt
2006-10-31  6:37       ` Fabio Massimo Di Nitto
2006-10-31  6:51       ` Fabio Massimo Di Nitto
2006-10-31  9:47       ` Fabio Massimo Di Nitto
2006-10-31 20:30         ` Benjamin Herrenschmidt
2006-10-31 20:44           ` Fabio Massimo Di Nitto

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=1162177334.25682.144.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=ben.collins@ubuntu.com \
    --cc=fabbione@ubuntu.com \
    --cc=jbailey@ubuntu.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.