]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dpaa: fix device leak when querying time stamp info
authorJohan Hovold <johan@kernel.org>
Fri, 25 Jul 2025 17:12:09 +0000 (19:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:48 +0000 (16:25 +0200)
commit1c491cb81f160079f33188dc8ae044c5af74fce5
treeb196539f6e8673784f375cd158b84cb322e6c204
parentcd59ae4a8bd9ce021f5b3ec32f07851dea90c95b
net: dpaa: fix device leak when querying time stamp info

commit 3fa840230f534385b34a4f39c8dd313fbe723f05 upstream.

Make sure to drop the reference to the ptp device taken by
of_find_device_by_node() when querying the time stamping capabilities.

Note that holding a reference to the ptp device does not prevent its
driver data from going away.

Fixes: 17ae0b0ee9db ("dpaa_eth: add the get_ts_info interface for ethtool")
Cc: stable@vger.kernel.org # 4.19
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250725171213.880-2-johan@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c