linux-stable/drivers/dpll
Jiri Pirko b27e32e936 dpll: fix dpll_xa_ref_*_del() for multiple registrations
[ Upstream commit b446631f35 ]

Currently, if there are multiple registrations of the same pin on the
same dpll device, following warnings are observed:
WARNING: CPU: 5 PID: 2212 at drivers/dpll/dpll_core.c:143 dpll_xa_ref_pin_del.isra.0+0x21e/0x230
WARNING: CPU: 5 PID: 2212 at drivers/dpll/dpll_core.c:223 __dpll_pin_unregister+0x2b3/0x2c0

The problem is, that in both dpll_xa_ref_dpll_del() and
dpll_xa_ref_pin_del() registration is only removed from list in case the
reference count drops to zero. That is wrong, the registration has to
be removed always.

To fix this, remove the registration from the list and free
it unconditionally, instead of doing it only when the ref reference
counter reaches zero.

Fixes: 9431063ad3 ("dpll: core: Add DPLL framework base functions")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:16:56 -04:00
..
dpll_core.c dpll: fix dpll_xa_ref_*_del() for multiple registrations 2024-03-26 18:16:56 -04:00
dpll_core.h dpll: rely on rcu for netdev_dpll_pin() 2024-02-26 18:39:34 -08:00
dpll_netlink.c dpll: move all dpll<>netdev helpers to dpll code 2024-03-05 18:36:42 -08:00
dpll_netlink.h dpll: netlink: Add DPLL framework base functions 2023-09-17 11:50:20 +01:00
dpll_nl.c dpll: fix possible deadlock during netlink dump operation 2024-02-08 18:29:21 -08:00
dpll_nl.h dpll: fix possible deadlock during netlink dump operation 2024-02-08 18:29:21 -08:00
Kconfig
Makefile