Files
linux-stable-mirror/net/devlink
Cosmin Ratiu f104794507 devlink: Fix parent ref leak in devl_rate_node_create()
[ Upstream commit ba45106342 ]

In the original commit the function bails out on kstrdup failure,
forgetting to decrement the refcnt of the parent.

Fix that by moving the parent refcnt setting after kstrdup.

Fixes: caba177d7f ("devlink: Enable creation of the devlink-rate nodes from the driver")
Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260616110633.1449432-2-cratiu@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-07-24 16:03:19 +02:00
..
…
…
…
…
…
…
…
2024-03-26 18:20:11 -04:00
…
…
…