[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1218618760.24951.137.camel@caritas-dev.intel.com>
Date: Wed, 13 Aug 2008 17:12:40 +0800
From: Huang Ying <ying.huang@...el.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>,
Pavel Machek <pavel@....cz>, nigel@...el.suspend2.net,
"Rafael J. Wysocki" <rjw@...k.pl>,
Andrew Morton <akpm@...ux-foundation.org>,
Vivek Goyal <vgoyal@...hat.com>, mingo@...e.hu,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org,
Kexec Mailing List <kexec@...ts.infradead.org>
Subject: [PATCH] kexec jump: fix compiling warning on xchg(&kexec_lock, 0)
in kernel_kexec()
Fix compiling warning on xchg(&kexec_lock, 0) in kernel_kexec().
Signed-off-by: Huang Ying <ying.huang@...el.com>
---
kernel/kexec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1433,6 +1433,7 @@ module_init(crash_save_vmcoreinfo_init)
int kernel_kexec(void)
{
int error = 0;
+ int locked;
if (xchg(&kexec_lock, 1))
return -EBUSY;
@@ -1498,7 +1499,8 @@ int kernel_kexec(void)
#endif
Unlock:
- xchg(&kexec_lock, 0);
+ locked = xchg(&kexec_lock, 0);
+ BUG_ON(!locked);
return error;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists