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>
This commit is contained in:
committed by
Alex Deucher
parent
f113cc32e3
commit
8f7519b2f3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user