diff options
author | Roland McGrath <roland@redhat.com> | 2006-09-29 05:00:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:15 -0400 |
commit | 0b4a8a789a328af6aac613734c362cf6aad72201 (patch) | |
tree | e2488a7e4767dd1d25f4691b12fde86041404982 /kernel/kexec.c | |
parent | 3171a0305d62e6627a24bff35af4f997e4988a80 (diff) |
[PATCH] kexec warning fix
This fixes a couple of compiler warnings, and adds paranoia checks as well.
Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r-- | kernel/kexec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index 37cad75cf494..fcdd5d2bc3f4 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -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 | ||