diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-30 23:55:03 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-30 23:55:03 -0400 |
commit | e993835441734c184d70d3716eed78a08eeb71c2 (patch) | |
tree | 583aa17813cdae1c4640e353f8c6df3f197e7548 /kernel/kexec.c | |
parent | 360f654e7cda850034f3f6252a7a7cff3fa77356 (diff) | |
parent | 1bdfd554be94def718323659173517c5d4a69d25 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r-- | kernel/kexec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index 50087ecf337e..fcdd5d2bc3f4 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -40,7 +40,7 @@ struct resource crashk_res = { | |||
40 | 40 | ||
41 | int kexec_should_crash(struct task_struct *p) | 41 | int kexec_should_crash(struct task_struct *p) |
42 | { | 42 | { |
43 | if (in_interrupt() || !p->pid || p->pid == 1 || panic_on_oops) | 43 | if (in_interrupt() || !p->pid || is_init(p) || panic_on_oops) |
44 | return 1; | 44 | return 1; |
45 | return 0; | 45 | return 0; |
46 | } | 46 | } |
@@ -995,7 +995,8 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, | |||
995 | image = xchg(dest_image, image); | 995 | image = xchg(dest_image, image); |
996 | 996 | ||
997 | out: | 997 | out: |
998 | xchg(&kexec_lock, 0); /* Release the mutex */ | 998 | locked = xchg(&kexec_lock, 0); /* Release the mutex */ |
999 | BUG_ON(!locked); | ||
999 | kimage_free(image); | 1000 | kimage_free(image); |
1000 | 1001 | ||
1001 | return result; | 1002 | return result; |
@@ -1061,7 +1062,8 @@ void crash_kexec(struct pt_regs *regs) | |||
1061 | machine_crash_shutdown(&fixed_regs); | 1062 | machine_crash_shutdown(&fixed_regs); |
1062 | machine_kexec(kexec_crash_image); | 1063 | machine_kexec(kexec_crash_image); |
1063 | } | 1064 | } |
1064 | xchg(&kexec_lock, 0); | 1065 | locked = xchg(&kexec_lock, 0); |
1066 | BUG_ON(!locked); | ||
1065 | } | 1067 | } |
1066 | } | 1068 | } |
1067 | 1069 | ||