mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: dpaa2: ptp: fix device node reference leak on remove
dpaa2_ptp_probe() gets a referenced device node with of_find_compatible_node() and stores it in dev->of_node. The probe failure paths release this reference with of_node_put(). However, after a successful probe, dpaa2_ptp_remove() tears down the PTP and MC resources without dropping the device node reference. Release dev->of_node during driver removal and clear the pointer after dropping the reference. This issue was found by manual code inspection. Cc: stable+noautosel@kernel.org # untested fix to a driver init path Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Link: https://patch.msgid.link/20260916030015.2818545-1-lgs201920130244@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
83f09b3bcc
commit
9211c455de
1 changed files with 2 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue