.. | .. |
---|
38 | 38 | task_pid_nr(current), task_stack_page(current) + 1); |
---|
39 | 39 | |
---|
40 | 40 | if (!user_mode(regs) || in_interrupt()) |
---|
41 | | - dump_mem("Stack: ", regs->regs[15], THREAD_SIZE + |
---|
42 | | - (unsigned long)task_stack_page(current)); |
---|
| 41 | + dump_mem("Stack: ", KERN_DEFAULT, regs->regs[15], |
---|
| 42 | + THREAD_SIZE + (unsigned long)task_stack_page(current)); |
---|
43 | 43 | |
---|
44 | 44 | notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV); |
---|
45 | 45 | |
---|
.. | .. |
---|
57 | 57 | if (panic_on_oops) |
---|
58 | 58 | panic("Fatal exception"); |
---|
59 | 59 | |
---|
60 | | - do_exit(SIGSEGV); |
---|
| 60 | + make_task_dead(SIGSEGV); |
---|
61 | 61 | } |
---|
62 | 62 | |
---|
63 | 63 | void die_if_kernel(const char *str, struct pt_regs *regs, long err) |
---|
.. | .. |
---|
118 | 118 | |
---|
119 | 119 | if (addr < PAGE_OFFSET) |
---|
120 | 120 | return 0; |
---|
121 | | - if (probe_kernel_address((insn_size_t *)addr, opcode)) |
---|
| 121 | + if (get_kernel_nofault(opcode, (insn_size_t *)addr)) |
---|
122 | 122 | return 0; |
---|
123 | 123 | if (opcode == TRAPA_BUG_OPCODE) |
---|
124 | 124 | return 1; |
---|
.. | .. |
---|
141 | 141 | SIGTRAP) == NOTIFY_STOP) |
---|
142 | 142 | return; |
---|
143 | 143 | |
---|
144 | | - force_sig(SIGTRAP, current); |
---|
| 144 | + force_sig(SIGTRAP); |
---|
145 | 145 | } |
---|
146 | 146 | |
---|
147 | 147 | /* |
---|
.. | .. |
---|
167 | 167 | } |
---|
168 | 168 | #endif |
---|
169 | 169 | |
---|
170 | | - force_sig(SIGTRAP, current); |
---|
| 170 | + force_sig(SIGTRAP); |
---|
171 | 171 | } |
---|
| 172 | + |
---|
| 173 | +#ifdef CONFIG_DYNAMIC_FTRACE |
---|
| 174 | +extern void arch_ftrace_nmi_enter(void); |
---|
| 175 | +extern void arch_ftrace_nmi_exit(void); |
---|
| 176 | +#else |
---|
| 177 | +static inline void arch_ftrace_nmi_enter(void) { } |
---|
| 178 | +static inline void arch_ftrace_nmi_exit(void) { } |
---|
| 179 | +#endif |
---|
172 | 180 | |
---|
173 | 181 | BUILD_TRAP_HANDLER(nmi) |
---|
174 | 182 | { |
---|
175 | 183 | unsigned int cpu = smp_processor_id(); |
---|
176 | 184 | TRAP_HANDLER_DECL; |
---|
| 185 | + |
---|
| 186 | + arch_ftrace_nmi_enter(); |
---|
177 | 187 | |
---|
178 | 188 | nmi_enter(); |
---|
179 | 189 | nmi_count(cpu)++; |
---|
.. | .. |
---|
190 | 200 | } |
---|
191 | 201 | |
---|
192 | 202 | nmi_exit(); |
---|
| 203 | + |
---|
| 204 | + arch_ftrace_nmi_exit(); |
---|
193 | 205 | } |
---|