提交 0b4a8a78 编写于 作者: R Roland McGrath 提交者: Linus Torvalds

[PATCH] kexec warning fix

This fixes a couple of compiler warnings, and adds paranoia checks as well.
Signed-off-by: NRoland McGrath <roland@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 3171a030
...@@ -995,7 +995,8 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, ...@@ -995,7 +995,8 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
image = xchg(dest_image, image); image = xchg(dest_image, image);
out: out:
xchg(&kexec_lock, 0); /* Release the mutex */ locked = xchg(&kexec_lock, 0); /* Release the mutex */
BUG_ON(!locked);
kimage_free(image); kimage_free(image);
return result; return result;
...@@ -1061,7 +1062,8 @@ void crash_kexec(struct pt_regs *regs) ...@@ -1061,7 +1062,8 @@ void crash_kexec(struct pt_regs *regs)
machine_crash_shutdown(&fixed_regs); machine_crash_shutdown(&fixed_regs);
machine_kexec(kexec_crash_image); machine_kexec(kexec_crash_image);
} }
xchg(&kexec_lock, 0); locked = xchg(&kexec_lock, 0);
BUG_ON(!locked);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册