Skip to content
Commit 65009906 authored by Daniel Golle's avatar Daniel Golle Committed by Greg Kroah-Hartman
Browse files

net: ethernet: mtk_eth_soc: fix NULL pointer on hw reset



[ Upstream commit 604204fc ]

When a hardware reset is triggered on devices not initializing WED the
calls to mtk_wed_fe_reset and mtk_wed_fe_reset_complete dereference a
pointer on uninitialized stack memory.
Break out of both functions in case a hw_list entry is 0.

Fixes: 08a764a7 ("net: ethernet: mtk_wed: add reset/reset_complete callbacks")
Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Acked-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/5465c1609b464cc7407ae1530c40821dcdf9d3e6.1692634266.git.daniel@makrotopia.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d56f8304
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment