Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75109
b: refs/heads/master
c: 2c3b20e
h: refs/heads/master
i:
  75107: fb9e482
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Dec 20, 2007
1 parent d853646 commit 04f23ae
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67e2be02328b9a61a9c799fbdd4ec94d7da0c323
refs/heads/master: 2c3b20e91fe3a083c5d9bc79437c485866ea251c
18 changes: 18 additions & 0 deletions trunk/kernel/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/nmi.h>
#include <linux/kexec.h>
#include <linux/debug_locks.h>
#include <linux/random.h>

int panic_on_oops;
int tainted;
Expand Down Expand Up @@ -265,13 +266,30 @@ void oops_enter(void)
do_oops_enter_exit();
}

/*
* 64-bit random ID for oopses:
*/
static u64 oops_id;

static int init_oops_id(void)
{
if (!oops_id)
get_random_bytes(&oops_id, sizeof(oops_id));

return 0;
}
late_initcall(init_oops_id);

/*
* Called when the architecture exits its oops handler, after printing
* everything.
*/
void oops_exit(void)
{
do_oops_enter_exit();
init_oops_id();
printk(KERN_WARNING "---[ end trace %016llx ]---\n",
(unsigned long long)oops_id);
}

#ifdef CONFIG_CC_STACKPROTECTOR
Expand Down

0 comments on commit 04f23ae

Please sign in to comment.