aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/compat.c
diff options
context:
space:
mode:
authorShang XiaoJing <shangxiaojing@huawei.com>2022-11-14 21:38:53 +0800
committerDavid S. Miller <davem@davemloft.net>2022-11-16 09:10:29 +0000
commit639f5d006e36bb303f525d9479448c412b720c39 (patch)
tree4753b1ba10fc4022cfd7b4d7dccf9a5d1dd3932f /ipc/compat.c
parentba86af3733aece88dbcee0dfebf7e2dcfefb2be4 (diff)
downloadlinux-639f5d006e36bb303f525d9479448c412b720c39.tar.gz
net: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start()
sparx_stats_init() calls create_singlethread_workqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen: sparx_stats_init() create_singlethread_workqueue() # failed, sparx5->stats_queue 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. So as sparx5_start(). Fixes: af4b11022e2d ("net: sparx5: add ethtool configuration and statistics support") Fixes: b37a1bae742f ("net: sparx5: add mactable support") Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'ipc/compat.c')
0 files changed, 0 insertions, 0 deletions