summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/kexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index c8a4370e2a34..cf3797b76786 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1503,7 +1503,8 @@ int kernel_kexec(void)
}
Unlock:
- xchg(&kexec_lock, 0);
+ if (!xchg(&kexec_lock, 0))
+ BUG();
return error;
}