aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/kernel/traps.c')
-rw-r--r--arch/ppc/kernel/traps.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index d87423d1003..961ede87be7 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -118,6 +118,28 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
118 info.si_code = code; 118 info.si_code = code;
119 info.si_addr = (void __user *) addr; 119 info.si_addr = (void __user *) addr;
120 force_sig_info(signr, &info, current); 120 force_sig_info(signr, &info, current);
121
122 /*
123 * Init gets no signals that it doesn't have a handler for.
124 * That's all very well, but if it has caused a synchronous
125 * exception and we ignore the resulting signal, it will just
126 * generate the same exception over and over again and we get
127 * nowhere. Better to kill it and let the kernel panic.
128 */
129 if (current->pid == 1) {
130 __sighandler_t handler;
131
132 spin_lock_irq(&current->sighand->siglock);
133 handler = current->sighand->action[signr-1].sa.sa_handler;
134 spin_unlock_irq(&current->sighand->siglock);
135 if (handler == SIG_DFL) {
136 /* init has generated a synchronous exception
137 and it doesn't have a handler for the signal */
138 printk(KERN_CRIT "init has generated signal %d "
139 "but has no handler for it\n", signr);
140 do_exit(signr);
141 }
142 }
121} 143}
122 144
123/* 145/*
@@ -849,10 +871,12 @@ void AltivecAssistException(struct pt_regs *regs)
849} 871}
850#endif /* CONFIG_ALTIVEC */ 872#endif /* CONFIG_ALTIVEC */
851 873
874#ifdef CONFIG_E500
852void PerformanceMonitorException(struct pt_regs *regs) 875void PerformanceMonitorException(struct pt_regs *regs)
853{ 876{
854 perf_irq(regs); 877 perf_irq(regs);
855} 878}
879#endif
856 880
857#ifdef CONFIG_FSL_BOOKE 881#ifdef CONFIG_FSL_BOOKE
858void CacheLockingException(struct pt_regs *regs, unsigned long address, 882void CacheLockingException(struct pt_regs *regs, unsigned long address,