From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B31E040926E; Tue, 21 Jul 2026 19:32:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662339; cv=none; b=YSgRBT1lCmXsi5PuLQQ0fH50X4W7kBiXAwmjImOpE3/koQAgM0me6F1/td+Q3TNV7cq+Y30cwxmXVeoZO6QJ2Ey79842Gwvx14mXHUaCMWYN2DrYBK5Irr7jaihY0BEjA5PBGK7UzChdHD8pZT+QVaEhRAUvlhWq8utELibpIEU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662339; c=relaxed/simple; bh=RQvIa6J3fVoPGJv+bkSJTgmN/0bRJpQrbJWuWrjPId0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bwGi5FJ9HVdlHefXH2K1DqABR5c8tXTt6GXLJZzmiw+8q2B906bshb4VCMX4Cu/aNtkkouaFwvKPLkRAWGTEIu9eEh4XKELHN0WOa5+GT89aFl7METh3YW9q+bEgRY/cbXe9LJeChwgVginxVikHsOuObOX1UMHEWh/ra9jzOfs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QnWyy60X; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QnWyy60X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 249C31F000E9; Tue, 21 Jul 2026 19:32:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784662338; bh=KuA3SvmCZJX1l1tNr+X6Es9AtnPmT65yomhMOmGwvT8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QnWyy60X6TqeUPnnzSD6RY4HNnhaifjoCsd3PMIPC3DuHuFr7Do4VzptrCNq1dI5L KiNkSzklWCvHxSwkDLoRnoVNI3GxyM/R9PhAe7m01JErXpCF8MUlyCrZbN5CxTZRs5 yWJQnnas0jYCd9Jo5P/vQAkRfAl/pfX0KC53GbU4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Grzegorz Nitka , Arkadiusz Kubalewski , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.12 0370/1276] dpll: emit per-dpll delete notifications in dpll_pin_on_pin_unregister() Date: Tue, 21 Jul 2026 17:13:33 +0200 Message-ID: <20260721152454.387490839@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Grzegorz Nitka [ Upstream commit df0ba51ccf873e533669578104981109217d8201 ] 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: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions") Signed-off-by: Grzegorz Nitka Reviewed-by: Arkadiusz Kubalewski Link: https://patch.msgid.link/20260607183045.1213735-6-grzegorz.nitka@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/dpll/dpll_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c index 9fdfb7617126c7..08b5055ee09cf5 100644 --- a/drivers/dpll/dpll_core.c +++ b/drivers/dpll/dpll_core.c @@ -966,14 +966,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); -- 2.53.0