diff options
author | Shang XiaoJing <[email protected]> | 2022-11-17 10:45:14 +0800 |
---|---|---|
committer | Helge Deller <[email protected]> | 2022-12-17 23:19:38 +0100 |
commit | 41f563ab3c33698bdfc3403c7c2e6c94e73681e4 (patch) | |
tree | 709401d0bddad8e5890de63441371c067bdf594e /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
parent | 1bc5434632593ea3bb3a1ed2499af8c31796448b (diff) |
parisc: led: Fix potential null-ptr-deref in start_task()
start_task() calls create_singlethread_workqueue() and not checked the
ret value, which may return NULL. And a null-ptr-deref may happen:
start_task()
create_singlethread_workqueue() # failed, led_wq is NULL
queue_delayed_work()
queue_delayed_work_on()
__queue_delayed_work() # warning here, but continue
__queue_work() # access wq->flags, null-ptr-deref
Check the ret value and return -ENOMEM if it is NULL.
Fixes: 3499495205a6 ("[PARISC] Use work queue in LED/LCD driver instead of tasklet.")
Signed-off-by: Shang XiaoJing <[email protected]>
Signed-off-by: Helge Deller <[email protected]>
Cc: <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions