]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:38:22 +0000 (08:38 +0100)
commit43aadaf6eff9b1555ba26d2545a8842c1204b034
tree38e7b850eb90d3a329e9c8dbf1b2e1c8bdc639d8
parent79861be01c5b11361bd86e00b09a4633b31fd7b2
net: phy: fixed_phy: fix use-after-free when checking link GPIO

[ 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>
drivers/net/phy/fixed_phy.c