diff options
Diffstat (limited to 'arch/x86/kernel/traps.c')
| -rw-r--r-- | arch/x86/kernel/traps.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 67db4f43309e..d366adfc61da 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
| @@ -141,8 +141,7 @@ void ist_begin_non_atomic(struct pt_regs *regs) | |||
| 141 | * will catch asm bugs and any attempt to use ist_preempt_enable | 141 | * will catch asm bugs and any attempt to use ist_preempt_enable |
| 142 | * from double_fault. | 142 | * from double_fault. |
| 143 | */ | 143 | */ |
| 144 | BUG_ON((unsigned long)(current_top_of_stack() - | 144 | BUG_ON(!on_thread_stack()); |
| 145 | current_stack_pointer) >= THREAD_SIZE); | ||
| 146 | 145 | ||
| 147 | preempt_enable_no_resched(); | 146 | preempt_enable_no_resched(); |
| 148 | } | 147 | } |
| @@ -209,9 +208,6 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str, | |||
| 209 | if (fixup_exception(regs, trapnr)) | 208 | if (fixup_exception(regs, trapnr)) |
| 210 | return 0; | 209 | return 0; |
| 211 | 210 | ||
| 212 | if (fixup_bug(regs, trapnr)) | ||
| 213 | return 0; | ||
| 214 | |||
| 215 | tsk->thread.error_code = error_code; | 211 | tsk->thread.error_code = error_code; |
| 216 | tsk->thread.trap_nr = trapnr; | 212 | tsk->thread.trap_nr = trapnr; |
| 217 | die(str, regs, error_code); | 213 | die(str, regs, error_code); |
| @@ -292,6 +288,13 @@ static void do_error_trap(struct pt_regs *regs, long error_code, char *str, | |||
| 292 | 288 | ||
| 293 | RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU"); | 289 | RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU"); |
| 294 | 290 | ||
| 291 | /* | ||
| 292 | * WARN*()s end up here; fix them up before we call the | ||
| 293 | * notifier chain. | ||
| 294 | */ | ||
| 295 | if (!user_mode(regs) && fixup_bug(regs, trapnr)) | ||
| 296 | return; | ||
| 297 | |||
| 295 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) != | 298 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) != |
| 296 | NOTIFY_STOP) { | 299 | NOTIFY_STOP) { |
| 297 | cond_local_irq_enable(regs); | 300 | cond_local_irq_enable(regs); |
