mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:12:01 +02:00
drm/amdkfd: Fix NULL Pointer Dereference in KFD queue
Through KFD IOCTL Fuzzing we encountered a NULL pointer derefrence when calling kfd_queue_acquire_buffers. Fixes:629568d25f("drm/amdkfd: Validate queue cwsr area and eop buffer size") Signed-off-by: Andrew Martin <Andrew.Martin@amd.com> Reviewed-by: Philip Yang <Philip.Yang@amd.com> Signed-off-by: Andrew Martin <Andrew.Martin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit049e5bf3c8) Cc: stable@vger.kernel.org
This commit is contained in:
parent
374c9faac5
commit
fd617ea3b7
|
|
@ -266,8 +266,8 @@ int kfd_queue_acquire_buffers(struct kfd_process_device *pdd, struct queue_prope
|
|||
/* EOP buffer is not required for all ASICs */
|
||||
if (properties->eop_ring_buffer_address) {
|
||||
if (properties->eop_ring_buffer_size != topo_dev->node_props.eop_buffer_size) {
|
||||
pr_debug("queue eop bo size 0x%lx not equal to node eop buf size 0x%x\n",
|
||||
properties->eop_buf_bo->tbo.base.size,
|
||||
pr_debug("queue eop bo size 0x%x not equal to node eop buf size 0x%x\n",
|
||||
properties->eop_ring_buffer_size,
|
||||
topo_dev->node_props.eop_buffer_size);
|
||||
err = -EINVAL;
|
||||
goto out_err_unreserve;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user