mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
dpll: emit per-dpll delete notifications in dpll_pin_on_pin_unregister()
dpll_pin_on_pin_register() emits a creation notification for every
parent->dpll_refs entry, but dpll_pin_on_pin_unregister() emitted only
one deletion notification outside the loop. When a pin is registered
against multiple parent dplls, userspace sees N creates but a single
delete and leaks per-dpll state.
Move dpll_pin_delete_ntf() into the loop and call it before
__dpll_pin_unregister() so the DPLL_REGISTERED mark is still set when
dpll_pin_available() is consulted.
Fixes: 9d71b54b65 ("dpll: netlink: Add DPLL framework base functions")
Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Link: https://patch.msgid.link/20260607183045.1213735-6-grzegorz.nitka@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e83b403eb1
commit
df0ba51ccf
|
|
@ -1036,14 +1036,14 @@ void dpll_pin_on_pin_unregister(struct dpll_pin *parent, struct dpll_pin *pin,
|
|||
unsigned long i;
|
||||
|
||||
mutex_lock(&dpll_lock);
|
||||
dpll_pin_delete_ntf(pin);
|
||||
dpll_xa_ref_pin_del(&pin->parent_refs, parent, ops, priv, pin);
|
||||
xa_for_each(&pin->dpll_refs, i, ref) {
|
||||
reg = dpll_pin_registration_find(ref, ops, priv, parent);
|
||||
if (!reg)
|
||||
continue;
|
||||
dpll_pin_delete_ntf(pin);
|
||||
__dpll_pin_unregister(ref->dpll, pin, ops, priv, parent);
|
||||
}
|
||||
dpll_xa_ref_pin_del(&pin->parent_refs, parent, ops, priv, pin);
|
||||
mutex_unlock(&dpll_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dpll_pin_on_pin_unregister);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user