Skip to content

Commit

Permalink
x86: Move call to print_modules() out of show_regs()
Browse files Browse the repository at this point in the history
Printing the list of loaded modules is really unrelated to what
this function is about, and is particularly unnecessary in the
context of the SysRQ key handling (gets printed so far over and
over).

It should really be the caller of the function to decide whether
this piece of information is useful (and to avoid redundantly
printing it).

Signed-off-by: Jan Beulich <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
jbeulich authored and Ingo Molnar committed Jun 20, 2012
1 parent 0d26d1d commit 0fa0e2f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions arch/x86/kernel/dumpstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP)
return 1;

print_modules();
show_regs(regs);
#ifdef CONFIG_X86_32
if (user_mode_vm(regs)) {
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/dumpstack_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ void show_regs(struct pt_regs *regs)
{
int i;

print_modules();
__show_regs(regs, !user_mode_vm(regs));

pr_emerg("Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)\n",
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/dumpstack_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ void show_regs(struct pt_regs *regs)

sp = regs->sp;
printk("CPU %d ", cpu);
print_modules();
__show_regs(regs, 1);
printk(KERN_DEFAULT "Process %s (pid: %d, threadinfo %p, task %p)\n",
cur->comm, cur->pid, task_thread_info(cur), cur);
Expand Down

0 comments on commit 0fa0e2f

Please sign in to comment.