|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.21] xen/kexec: return error code for unknown hypercalls
commit 867b7d3f97cc65a31738697bcb05bb3d3f604188
Author: Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Wed Feb 11 12:17:57 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Feb 11 12:17:57 2026 +0100
xen/kexec: return error code for unknown hypercalls
Currently do_kexec_op_internal() will return 0 for unknown hypercalls. Fix
this by returning -EOPNOTSUPP instead.
While there remove the pointless initialization of ret to -EINVAL; it just
makes the code confusing.
Fixes: d046f361dc93 ("Xen Security Modules: XSM")
Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
master commit: 1ee8b11c1106dca6b8fe0d54c0e79146bb6545f0
master date: 2026-02-06 20:56:16 +0100
---
xen/common/kexec.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 84fe8c3597..1a3a20e1c9 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -1217,7 +1217,7 @@ static int do_kexec_op_internal(unsigned long op,
XEN_GUEST_HANDLE_PARAM(void) uarg,
bool compat)
{
- int ret = -EINVAL;
+ int ret;
ret = xsm_kexec(XSM_PRIV);
if ( ret )
@@ -1258,6 +1258,10 @@ static int do_kexec_op_internal(unsigned long op,
case KEXEC_CMD_kexec_status:
ret = kexec_status(uarg);
break;
+
+ default:
+ ret = -EOPNOTSUPP;
+ break;
}
clear_bit(KEXEC_FLAG_IN_HYPERCALL, &kexec_flags);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |