[PATCH v3 net-next 0/2] fix possible deadlock during WED attach

Lorenzo Bianconi lorenzo at kernel.org
Wed Dec 7 06:04:53 PST 2022


Fix a possible deadlock in mtk_wed_attach if mtk_wed_wo_init routine fails.
Check wo pointer is properly allocated before running mtk_wed_wo_reset() and
mtk_wed_wo_deinit().

Changes sice v2:
- add WARN_ON in mtk_wed_mcu_msg_update()
- split in two patches
Changes since v1:
- move wo pointer checks in __mtk_wed_detach()

Lorenzo Bianconi (2):
  net: ethernet: mtk_wed: fix some possible NULL pointer dereferences
  net: ethernet: mtk_wed: fix possible deadlock if mtk_wed_wo_init fails

 drivers/net/ethernet/mediatek/mtk_wed.c     | 30 ++++++++++++++-------
 drivers/net/ethernet/mediatek/mtk_wed_mcu.c |  3 +++
 2 files changed, 23 insertions(+), 10 deletions(-)

-- 
2.38.1




More information about the Linux-mediatek mailing list