netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/2] fix possible deadlock during WED attach
@ 2022-12-07 14:04 Lorenzo Bianconi
  2022-12-07 14:04 ` [PATCH v3 net-next 1/2] net: ethernet: mtk_wed: fix some possible NULL pointer dereferences Lorenzo Bianconi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2022-12-07 14:04 UTC (permalink / raw)
  To: netdev
  Cc: nbd, john, sean.wang, Mark-MC.Lee, davem, edumazet, kuba, pabeni,
	matthias.bgg, linux-mediatek, lorenzo.bianconi, leon, sujuan.chen

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-09  3:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-07 14:04 [PATCH v3 net-next 0/2] fix possible deadlock during WED attach Lorenzo Bianconi
2022-12-07 14:04 ` [PATCH v3 net-next 1/2] net: ethernet: mtk_wed: fix some possible NULL pointer dereferences Lorenzo Bianconi
2022-12-08  8:44   ` Leon Romanovsky
2022-12-07 14:04 ` [PATCH v3 net-next 2/2] net: ethernet: mtk_wed: fix possible deadlock if mtk_wed_wo_init fails Lorenzo Bianconi
2022-12-08  8:44   ` Leon Romanovsky
2022-12-09  3:50 ` [PATCH v3 net-next 0/2] fix possible deadlock during WED attach patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).