Commit 3dbe2288 authored by Sean Anderson's avatar Sean Anderson Committed by sanglipeng
Browse files

net: fman: Unregister ethernet device on removal

stable inclusion
from stable-v5.10.155
commit 8aae24b0ed767542e71159ba0756a1faea70a6b2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7M5F4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8aae24b0ed767542e71159ba0756a1faea70a6b2



--------------------------------

[ Upstream commit b7cbc674 ]

When the mac device gets removed, it leaves behind the ethernet device.
This will result in a segfault next time the ethernet device accesses
mac_dev. Remove the ethernet device when we get removed to prevent
this. This is not completely reversible, since some resources aren't
cleaned up properly, but that can be addressed later.

Fixes: 39339616 ("fsl/fman: Add FMan MAC driver")
Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
Link: https://lore.kernel.org/r/20221103182831.2248833-1-sean.anderson@seco.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent f0dc9f60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment