summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
diff options
context:
space:
mode:
authorDavid Yat Sin <david.yatsin@amd.com>2022-02-18 17:53:43 -0500
committerAlex Deucher <alexander.deucher@amd.com>2022-02-23 14:02:50 -0500
commit8f7519b2f3a93f6eae76912be66188366cc47aed (patch)
treecbfce567c2021e20a8888844eccef745fe5b6a89 /drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
parentf113cc32e35b5503b268f0bd891fa2b7d6d12137 (diff)
drm/amdkfd: Fix for possible integer overflow
Fix for possible integer overflow when doing addition. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Yat Sin <david.yatsin@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index c3f252fc337b..6eca9509f2e3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -786,7 +786,7 @@ int kfd_criu_restore_queue(struct kfd_process *p,
}
*priv_data_offset += sizeof(*q_data);
- q_extra_data_size = q_data->ctl_stack_size + q_data->mqd_size;
+ q_extra_data_size = (uint64_t)q_data->ctl_stack_size + q_data->mqd_size;
if (*priv_data_offset + q_extra_data_size > max_priv_data_size) {
ret = -EINVAL;