summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorMa Ke <make24@iscas.ac.cn>2025-07-17 10:23:09 +0800
committerJakub Kicinski <kuba@kernel.org>2025-07-18 17:13:50 -0700
commit96e056ffba912ef18a72177f71956a5b347b5177 (patch)
treee757021254942309783fdc8c004a5b84185de0ab /scripts/lib/kdoc/kdoc_parser.py
parentee9f3a81ab08dfe0538dbd1746f81fd4d5147fdc (diff)
dpaa2-switch: Fix device reference count leak in MAC endpoint handling
The fsl_mc_get_endpoint() function uses device_find_child() for localization, which implicitly calls get_device() to increment the device's reference count before returning the pointer. However, the caller dpaa2_switch_port_connect_mac() fails to properly release this reference in multiple scenarios. We should call put_device() to decrement reference count properly. As comment of device_find_child() says, 'NOTE: you will need to drop the reference with put_device() after use'. Found by code review. Cc: stable@vger.kernel.org Fixes: 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") Signed-off-by: Ma Ke <make24@iscas.ac.cn> Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250717022309.3339976-3-make24@iscas.ac.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions