Skip to content

Commit

Permalink
drm/amd/display: handler not correctly checked at remove_irq_handler
Browse files Browse the repository at this point in the history
[why]
handler is supposedly passed in as a function pointer;
however, the entire struct amdgpu_dm_irq_handler_data
gets from the list is used to check match.

[how]
use the interrupt_handler within amdgpu_dm_irq_handler_data
for checking match.

Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Qingqing Zhuo authored and Alex Deucher committed Dec 23, 2020
1 parent 462fbeb commit ea96b12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ static struct list_head *remove_irq_handler(struct amdgpu_device *adev,
handler = list_entry(entry, struct amdgpu_dm_irq_handler_data,
list);

if (ih == handler) {
if (handler == NULL)
continue;

if (ih == handler->handler) {
/* Found our handler. Remove it from the list. */
list_del(&handler->list);
handler_removed = true;
Expand Down

0 comments on commit ea96b12

Please sign in to comment.