diff options
-rw-r--r-- | include/linux/elfcore.h | 9 | ||||
-rw-r--r-- | kernel/kexec.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 5ca54d77079f..7605c5e9589f 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
@@ -111,6 +111,15 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re | |||
111 | #endif | 111 | #endif |
112 | } | 112 | } |
113 | 113 | ||
114 | static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs) | ||
115 | { | ||
116 | #ifdef ELF_CORE_COPY_KERNEL_REGS | ||
117 | ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs); | ||
118 | #else | ||
119 | elf_core_copy_regs(elfregs, regs); | ||
120 | #endif | ||
121 | } | ||
122 | |||
114 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) | 123 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) |
115 | { | 124 | { |
116 | #ifdef ELF_CORE_COPY_TASK_REGS | 125 | #ifdef ELF_CORE_COPY_TASK_REGS |
diff --git a/kernel/kexec.c b/kernel/kexec.c index 8a6d7b08864e..795e7b67a228 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -1130,7 +1130,7 @@ void crash_save_cpu(struct pt_regs *regs, int cpu) | |||
1130 | return; | 1130 | return; |
1131 | memset(&prstatus, 0, sizeof(prstatus)); | 1131 | memset(&prstatus, 0, sizeof(prstatus)); |
1132 | prstatus.pr_pid = current->pid; | 1132 | prstatus.pr_pid = current->pid; |
1133 | elf_core_copy_regs(&prstatus.pr_reg, regs); | 1133 | elf_core_copy_kernel_regs(&prstatus.pr_reg, regs); |
1134 | buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS, | 1134 | buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS, |
1135 | &prstatus, sizeof(prstatus)); | 1135 | &prstatus, sizeof(prstatus)); |
1136 | final_note(buf); | 1136 | final_note(buf); |