mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
kexec: ensure kexec_status() return bit value of 0 or 1
When checking kexec_flags bit corresponding to the requested image, ensure that 0 or 1 is returned. Signed-off-by: Eric DeVolder <eric.devolder@oracle.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
366ff5f1b3
commit
f07618c290
1 file changed
+1
-1
+1
-1
@@ -1182,7 +1182,7 @@ static int kexec_status(XEN_GUEST_HANDLE_PARAM(void) uarg)
|
||||
if ( kexec_load_get_bits(status.type, &base, &bit) )
|
||||
return -EINVAL;
|
||||
|
||||
return test_bit(bit, &kexec_flags);
|
||||
return !!test_bit(bit, &kexec_flags);
|
||||
}
|
||||
|
||||
static int do_kexec_op_internal(unsigned long op,
|
||||
|
||||