Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a70d4393 authored by Jakub Bogusz's avatar Jakub Bogusz Committed by Linus Torvalds
Browse files

[PATCH] ppc32: don't recursively crash in die() on CHRP/PReP machines



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.

Signed-off-by: default avatarJakub Bogusz <qboosh@pld-linux.org>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ba8c6d53
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -81,8 +81,10 @@ void die(const char * str, struct pt_regs * fp, long err)
	console_verbose();
	spin_lock_irq(&die_lock);
#ifdef CONFIG_PMAC_BACKLIGHT
	if (_machine == _MACH_Pmac) {
		set_backlight_enable(1);
		set_backlight_level(BACKLIGHT_MAX);
	}
#endif
	printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
#ifdef CONFIG_PREEMPT