diff options
author | Shang XiaoJing <shangxiaojing@huawei.com> | 2022-11-17 05:45:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-14 12:16:36 +0300 |
commit | 3505c187b86136250b39e62c72a3a70435277af6 (patch) | |
tree | 05d9bdf4e096c2652538cb3f4a0d413908a9a27b /security | |
parent | 2c7c487cd85083d1aa1a403372e1ad576a3efeb4 (diff) | |
download | linux-3505c187b86136250b39e62c72a3a70435277af6.tar.xz |
parisc: led: Fix potential null-ptr-deref in start_task()
commit 41f563ab3c33698bdfc3403c7c2e6c94e73681e4 upstream.
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 <shangxiaojing@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions