diff options
author | Paul Mackerras <paulus@samba.org> | 2007-12-21 22:21:08 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-21 22:21:08 +1100 |
commit | c2a7dcad9f0d92d7a96e735abb8bec7b9c621536 (patch) | |
tree | bf9b20fdd5ab07e5b0e4e0b95c6a3dbab1005cb9 /kernel/panic.c | |
parent | 373a6da165ac3012a74fd072da340eabca55d031 (diff) | |
parent | ea67db4cdbbf7f4e74150e71da0984e25121f500 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'kernel/panic.c')
-rw-r--r-- | kernel/panic.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 6f6e03e9159..da4d6bac270 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -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; @@ -266,12 +267,29 @@ void oops_enter(void) } /* + * 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 |