Skip to content

Commit 2e054f6

Browse files
yonghuahwenlingz
authored andcommitted
hv: fix error debug message in hcall_set_callback_vector
this patch is to fix error debug message for invalid 'param' case, there is no string variable for '%s' output, which will potenially trigger hypervisor crash as it may access random memroy address and trigger SMAP violation. Tracked-On: #4092 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
1 parent 6199e65 commit 2e054f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hypervisor/common/hypercall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ int32_t hcall_set_callback_vector(const struct acrn_vm *vm, uint64_t param)
12341234
pr_err("%s: Targeting to service vm", __func__);
12351235
ret = -EPERM;
12361236
} else if ((param > NR_MAX_VECTOR) || (param < VECTOR_DYNAMIC_START)) {
1237-
pr_err("%s: Invalid passed vector\n");
1237+
pr_err("%s: Invalid passed vector\n", __func__);
12381238
ret = -EINVAL;
12391239
} else {
12401240
set_vhm_notification_vector((uint32_t)param);

0 commit comments

Comments
 (0)