Skip to content

Commit 871d377

Browse files
heukelumIngo Molnar
authored andcommitted
i386, dumpstack: unify die()
Make i386's die() equal to x86_64's version. Whitespace-only changes on x86_64, to make it equal to i386's version. (user_mode and user_mode_vm are equal on x86_64.) Signed-off-by: Alexander van Heukelum <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent e06ca43 commit 871d377

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

arch/x86/kernel/dumpstack_32.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,15 +378,11 @@ void die(const char *str, struct pt_regs *regs, long err)
378378
unsigned long flags = oops_begin();
379379
int sig = SIGSEGV;
380380

381-
if (die_nest_count < 3) {
381+
if (!user_mode_vm(regs))
382382
report_bug(regs->ip, regs);
383383

384-
if (__die(str, regs, err))
385-
sig = 0;
386-
} else {
387-
printk(KERN_EMERG "Recursive die() failure, output suppressed\n");
388-
}
389-
384+
if (__die(str, regs, err))
385+
sig = 0;
390386
oops_end(flags, regs, sig);
391387
}
392388

arch/x86/kernel/dumpstack_64.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,12 +506,16 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
506506
return 0;
507507
}
508508

509+
/*
510+
* This is gone through when something in the kernel has done something bad
511+
* and is about to be terminated:
512+
*/
509513
void die(const char *str, struct pt_regs *regs, long err)
510514
{
511515
unsigned long flags = oops_begin();
512516
int sig = SIGSEGV;
513517

514-
if (!user_mode(regs))
518+
if (!user_mode_vm(regs))
515519
report_bug(regs->ip, regs);
516520

517521
if (__die(str, regs, err))

0 commit comments

Comments
 (0)