Messages in this thread |  | | Subject | Re: [PATCH v2 net] net: phy: clear phydev->devlink when the link is deleted | | From | patchwork-bot+netdevbpf@kernel ... | | Date | Wed, 28 May 2025 00:50:35 +0000 |
| |
Hello:
This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>:
On Fri, 23 May 2025 16:37:59 +0800 you wrote: > There is a potential crash issue when disabling and re-enabling the > network port. When disabling the network port, phy_detach() calls > device_link_del() to remove the device link, but it does not clear > phydev->devlink, so phydev->devlink is not a NULL pointer. Then the > network port is re-enabled, but if phy_attach_direct() fails before > calling device_link_add(), the code jumps to the "error" label and > calls phy_detach(). Since phydev->devlink retains the old value from > the previous attach/detach cycle, device_link_del() uses the old value, > which accesses a NULL pointer and causes a crash. The simplified crash > log is as follows. > > [...]
Here is the summary with links: - [v2,net] net: phy: clear phydev->devlink when the link is deleted https://git.kernel.org/netdev/net/c/0795b05a59b1
You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
|  |