-
由 Shang XiaoJing 提交于
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: 34994952 ("[PARISC] Use work queue in LED/LCD driver instead of tasklet.") Signed-off-by: NShang XiaoJing <shangxiaojing@huawei.com> Signed-off-by: NHelge Deller <deller@gmx.de> Cc: <stable@vger.kernel.org>
41f563ab