mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jakub Bogusz <qboosh@pld-linux.org>
To: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: [PATCH 2.6][PPC32] RESEND: don't recursively crash in die() on CHRP/PReP machines
Date: Tue, 14 Jun 2005 21:38:26 +0200	[thread overview]
Message-ID: <20050614193826.GE13702@fngna.oyu> (raw)

This patch avoids recursive crash (leading to kernel stack overflow) in
die() on CHRP/PReP machines when CONFIG_PMAC_BACKLIGHT=y.
set_backlight_* functions are placed in pmac section, which is discarded
when _machine != _MACH_Pmac.

I already posted this patch to LKML few months ago:
http://www.ussg.iu.edu/hypermail/linux/kernel/0412.0/0300.html
and it has been applied to linux-2.4 tree, but still not 2.6.
(patch was made against 2.4.27, but still applies cleanly against
kernels up to 2.6.11.12)

Signed-off-by: Jakub Bogusz <qboosh@pld-linux.org>

--- linux-2.4.27/arch/ppc/kernel/traps.c.orig	Wed Apr 14 15:05:27 2004
+++ linux-2.4.27/arch/ppc/kernel/traps.c	Mon Nov 29 19:05:28 2004
@@ -88,8 +88,10 @@
 	console_verbose();
 	spin_lock_irq(&die_lock);
 #ifdef CONFIG_PMAC_BACKLIGHT
-	set_backlight_enable(1);
-	set_backlight_level(BACKLIGHT_MAX);
+	if (_machine == _MACH_Pmac) {
+		set_backlight_enable(1);
+		set_backlight_level(BACKLIGHT_MAX);
+	}
 #endif
 	printk("Oops: %s, sig: %ld\n", str, err);
 	show_regs(fp);


-- 
Jakub Bogusz    http://qboosh.cs.net.pl/

             reply	other threads:[~2005-06-14 19:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-14 19:38 Jakub Bogusz [this message]
2005-06-14 23:11 ` Benjamin Herrenschmidt

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=20050614193826.GE13702@fngna.oyu \
    --to=qboosh@pld-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®