From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 108B0315D33; Sun, 7 Jun 2026 18:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780857341; cv=none; b=UrNa6fzqRRIXEu/BW+FYkkCFeGfB7smHSu69GLm2LxwrZVQ20OeXCVZZ1Jxk7Ndiky7gTGqea7gzbexSVfGpxfFWKvZf33UZhjXWn9cn2uBJyNnAEolYFuIs1+i9E+Sio7MYfAJlpAhh3rfeSm9AaEpqgt3TVzLuQA52tdKkDrY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780857341; c=relaxed/simple; bh=7SLLTaGR04kcGW6NFlVhrv/kbAI3IG9DGTQq1xYnrM8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dpfd8KGrs4M3TFZA82q+E39KCYhK2xNJBkNIMUeO59Ud9ha0wxVOq8/OAaXrBVkl5wpHoQ+TIrIG9P2o4EVbJQj5bHl4Ti7a5izwxCJyGv2tbZEq40503nRcrQ5b66KtCxD7beclH0ANQbzJbrmkhUiEFfRF+6uBcILitV9/WDE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NkYL9Fvs; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NkYL9Fvs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1780857340; x=1812393340; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7SLLTaGR04kcGW6NFlVhrv/kbAI3IG9DGTQq1xYnrM8=; b=NkYL9FvsikkEmot+h+/ChIluBBC6J7DJ9CN+bccK+ymaRqDKNYPY4OvV nEFYVbzBJoVVC++zHfFF49dl5nIAIQHNh2c6masl4Pv7+GW95ORiWpC4f ZlJ4Tp/SWJuRHQsIlPsaB//goWi0ggiaqVwl2dodiIo4okk+hZeSLJjwz /ST0XjAaOUpfZyQgpTrn2dOHiwKv5lvKi1tBrBgaNyqBDBGrEPcwqwtd/ wGSWat1Yss6/RjlzUtC16AvdDgvp4w4SrIOjIAODbwg3Kqd7rPvXdyD/7 Lyz6dZdY2qfaOsIX1KNTcX4KewAFHliEpwgp/e6TWU7YxxWGXfLzE+xds w==; X-CSE-ConnectionGUID: E1Q3NDNoTt+g8oP+ny2c2g== X-CSE-MsgGUID: 7pp0lqc9RuaRN2qieNjNHw== X-IronPort-AV: E=McAfee;i="6800,10657,11810"; a="81602050" X-IronPort-AV: E=Sophos;i="6.24,193,1774335600"; d="scan'208";a="81602050" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2026 11:35:40 -0700 X-CSE-ConnectionGUID: AwFymosaQk6saXFOIEREXA== X-CSE-MsgGUID: GwQjfwa+Q9+SBIMRsi3Lkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,193,1774335600"; d="scan'208";a="245171379" Received: from gklab-003-001.igk.intel.com ([10.91.173.48]) by orviesa008.jf.intel.com with ESMTP; 07 Jun 2026 11:35:35 -0700 From: Grzegorz Nitka To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, poros@redhat.com, richardcochran@gmail.com, andrew+netdev@lunn.ch, przemyslaw.kitszel@intel.com, anthony.l.nguyen@intel.com, Prathosh.Satish@microchip.com, ivecera@redhat.com, jiri@resnulli.us, arkadiusz.kubalewski@intel.com, vadim.fedorenko@linux.dev, donald.hunter@gmail.com, horms@kernel.org, pabeni@redhat.com, kuba@kernel.org, davem@davemloft.net, edumazet@google.com, Grzegorz Nitka Subject: [PATCH v14 net-next 04/13] dpll: send delete notification before unregister in on-pin rollback Date: Sun, 7 Jun 2026 20:30:36 +0200 Message-Id: <20260607183045.1213735-5-grzegorz.nitka@intel.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20260607183045.1213735-1-grzegorz.nitka@intel.com> References: <20260607183045.1213735-1-grzegorz.nitka@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The rollback path in dpll_pin_on_pin_register() called __dpll_pin_unregister() before dpll_pin_delete_ntf(). When the unregister dropped the pin's last DPLL reference it cleared the DPLL_REGISTERED mark in dpll_pin_xa, so the subsequent dpll_pin_event_send() failed dpll_pin_available() and aborted with -ENODEV. As a result userspace was never notified of the rollback deletion and remained out of sync with the kernel. Send the delete notification first, matching the order used by dpll_pin_unregister() and dpll_pin_on_pin_unregister(). Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions") Signed-off-by: Grzegorz Nitka --- drivers/dpll/dpll_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c index cea7e2be2cbc..80195f3a84f3 100644 --- a/drivers/dpll/dpll_core.c +++ b/drivers/dpll/dpll_core.c @@ -1007,9 +1007,9 @@ int dpll_pin_on_pin_register(struct dpll_pin *parent, struct dpll_pin *pin, dpll_unregister: xa_for_each(&parent->dpll_refs, i, ref) if (i < stop) { + dpll_pin_delete_ntf(pin); __dpll_pin_unregister(ref->dpll, pin, ops, priv, parent); - dpll_pin_delete_ntf(pin); } dpll_xa_ref_pin_del(&pin->parent_refs, parent, ops, priv, pin); unlock: -- 2.39.3