]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
net: phy: fixed_phy: fix use-after-free when checking link GPIO
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 3 Jan 2020 01:03:19 +0000 (17:03 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 24 Feb 2020 15:19:50 +0000 (16:19 +0100)
commit136fd8ac1d5e435bf9d3d9f09d6bf77f7fc48bc9
tree446db871d2a0676a32c7b4dcdb4d54c35d3820d8
parent55371fbcf5c218455aa619a5ac91673ec2200e2c
net: phy: fixed_phy: fix use-after-free when checking link GPIO

BugLink: https://bugs.launchpad.net/bugs/1864488
[ Upstream commit d266f19f3ae7fbcaf92229639b78d2110ae44f33 ]

If we fail to locate GPIO for any reason other than deferral or
not-found-GPIO, we try to print device tree node info, however if might
be freed already as we called of_node_put() on it.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/phy/fixed_phy.c