Commit 914c3d63 authored by Tejun Heo's avatar Tejun Heo Committed by Ingo Molnar

x86: include correct %gs in a.out core dump

Impact: dump the correct %gs into a.out core dump

aout_dump_thread() read %gs but didn't include it in core dump.  Fix
it.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 55a8ba4b
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
*/ */
static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
{ {
u16 gs;
/* changed the size calculations - should hopefully work better. lbt */ /* changed the size calculations - should hopefully work better. lbt */
dump->magic = CMAGIC; dump->magic = CMAGIC;
dump->start_code = 0; dump->start_code = 0;
...@@ -57,7 +55,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) ...@@ -57,7 +55,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
dump->regs.ds = (u16)regs->ds; dump->regs.ds = (u16)regs->ds;
dump->regs.es = (u16)regs->es; dump->regs.es = (u16)regs->es;
dump->regs.fs = (u16)regs->fs; dump->regs.fs = (u16)regs->fs;
savesegment(gs, gs); savesegment(gs, dump->regs.gs);
dump->regs.orig_ax = regs->orig_ax; dump->regs.orig_ax = regs->orig_ax;
dump->regs.ip = regs->ip; dump->regs.ip = regs->ip;
dump->regs.cs = (u16)regs->cs; dump->regs.cs = (u16)regs->cs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment