From ad123452d0ea8b255127bd0c15fc5bd833566a83 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Thu, 11 Aug 2022 11:41:02 -0700 Subject: [PATCH] virt: haven: rsc_mgr: Allocate right buffer size of requests The correct size for sending RM messages is HH_MSGQ_MAX_MSG_SIZE_BYTES. The amount of actual payload data is HH_RM_MAX_MSG_SIZE_BYTES and is incorrect. Change-Id: I8aa7de79ab57b60da366c0a4a1f82233d22ab59c Signed-off-by: Elliot Berman --- drivers/virt/haven/hh_rm_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/virt/haven/hh_rm_core.c b/drivers/virt/haven/hh_rm_core.c index 02fcfcb8ef82..cb45cd65aad4 100644 --- a/drivers/virt/haven/hh_rm_core.c +++ b/drivers/virt/haven/hh_rm_core.c @@ -525,7 +525,7 @@ static int hh_rm_send_request(u32 message_id, return -E2BIG; } - msg = kzalloc(HH_RM_MAX_MSG_SIZE_BYTES, GFP_KERNEL); + msg = kzalloc(HH_MSGQ_MAX_MSG_SIZE_BYTES, GFP_KERNEL); if (!msg) return -ENOMEM; @@ -542,7 +542,7 @@ static int hh_rm_send_request(u32 message_id, payload_size = buff_size_remaining; } - memset(msg, 0, HH_RM_MAX_MSG_SIZE_BYTES); + memset(msg, 0, HH_MSGQ_MAX_MSG_SIZE_BYTES); /* Fill header */ hdr = msg;