From 6337e0e272925da62215df968b5793e75934fedb Mon Sep 17 00:00:00 2001 From: prsethi Date: Thu, 15 Dec 2022 21:20:32 +0000 Subject: [PATCH] gpu:nvgpu: clear domain response memory Same receive queue memory allocated for the domain gets used to send the response to userspace. So it is needed to clear the memory before updating it. Bug 3884011 Change-Id: I23270f9b5796ac1f4cc8f8f180da7b8abd527f77 Signed-off-by: prsethi Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2828818 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/common/nvs/nvs_sched_ctrl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/nvgpu/common/nvs/nvs_sched_ctrl.c b/drivers/gpu/nvgpu/common/nvs/nvs_sched_ctrl.c index 4287bd6d0..575b3e49f 100644 --- a/drivers/gpu/nvgpu/common/nvs/nvs_sched_ctrl.c +++ b/drivers/gpu/nvgpu/common/nvs/nvs_sched_ctrl.c @@ -766,6 +766,9 @@ static int nvgpu_nvs_ctrl_fifo_scheduler_process_receiver(struct gk20a *g, { int result = 0; + (void)memset(receiver_queue_sender->internal_buffer, 0, + NVS_DOMAIN_MESSAGE_MAX_PAYLOAD_SIZE); + if (send_queue_receiver->msg_type == NVS_DOMAIN_MSG_TYPE_CTRL_GET_CAPS_INFO) { result = nvgpu_nvs_ctrl_fifo_scheduler_process_caps_request(g, send_queue_receiver, receiver_queue_sender);