🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #11896

Re: [PATCH net 1/2] dpll: notify about a reference sync pair only if it was added

#11896
From: Vadim Fedorenko
Date: Thu, 05 Nov 2026 22:14
38 lines
10040 bytes
On 05/11/2026 13:11, Ivan Vecera wrote:
> dpll_pin_ref_sync_pair_add() sends a pin change notification even when
> xa_insert() fails and nothing has changed. zl3073x gets -EBUSY when
> another channel has already added the same pair and ignores it, so user
> space is notified about a change that did not happen.
> 
> Send the notification only after a successful insert.
> 
> Found by code review. Reproduced on a ZL30732A board with kprobes on
> dpll_pin_ref_sync_pair_add() and __dpll_pin_change_ntf(): loading the
> driver adds one pair twice and the add failing with -EBUSY sends a
> notification. With this patch it does not, and the successful add still
> does. A test module adding one pair twice shows the same on the monitor
> group.
> 
> Fixes: 58256a26bfb3 ("dpll: add reference sync get/set")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
>   drivers/dpll/dpll_core.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c
> index 8389983f425695..277692d12d3d1e 100644
> --- a/drivers/dpll/dpll_core.c
> +++ b/drivers/dpll/dpll_core.c
> @@ -1081,7 +1081,8 @@ int dpll_pin_ref_sync_pair_add(struct dpll_pin *pin,
>   	mutex_lock(&dpll_lock);
>   	ret = xa_insert(&pin->ref_sync_pins, ref_sync_pin->id,
>   			ref_sync_pin, GFP_KERNEL);
> -	__dpll_pin_change_ntf(pin);
> +	if (!ret)
> +		__dpll_pin_change_ntf(pin);
>   	mutex_unlock(&dpll_lock);
>   
>   	return ret;

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Technical Details
Message-ID: <546481b8-43b3-4812-9b04-78367a071453@linux.dev>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357629-linux-kernel-netdev=dewy.ru
References: <20261105131145.1010406-1-ivecera@redhat.com> <20261105131145.1010406-2-ivecera@redhat.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357629-linux-kernel-netdev=dewy.ru
From: vadim.fedorenko@linux.dev (Vadim Fedorenko)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 1/2] dpll: notify about a reference sync pair only if
 it was added
Date: Thu, 5 Nov 2026 23:14:08 +0100
Organization: Usenet Network
Message-ID: <546481b8-43b3-4812-9b04-78367a071453@linux.dev>
References: <20261105131145.1010406-1-ivecera@redhat.com>
 <20261105131145.1010406-2-ivecera@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3741744"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:aEX14NU/JKkhZRu2dLdcG1FC22k= sha256:8nzYJJhZZYE3ri3S3OupnciZIdcWf005RpNFvUHiTGs=
	sha1:E9C0qWTZnRmF2YdTHUFDuLSm/4I= sha256:SDIy908JTRktsVpUgrl6Zp7ItkLACwcxF+SEYiVp/cA=
Content-Language: en-US
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 00E201130D4; Fri,  6 Nov 2026 01:14:42 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 5W-GeQUu5rXf;
	Fri,  6 Nov 2026 01:14:38 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-357629-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id E10081130D0; Fri,  6 Nov 2026 01:14:28 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 421DB21A87; Thu,  5 Nov 2026 22:14:20 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793916859;
	b=giMbqRxmbnMHUnCpm1V/OhI4wVdV5YR82quP3/pDtu2GUMo+WSN4OCBbTpltUcpSvNi+
	 7Q9etT96P60PRiuecSH8daNAgBdFBAUCvOprdjM+Wy4Zh1DoIzUU3Kbk8xP+ZsgJMew3O
	 sA1OePUZeLDaFc8H4y7/jdEL7yYcIr+A8EQdu/n3o2LkfzgZpD/J5tkiWDwWevn7Ue2Vx
	 +Q24btwW4TtwwBHf6Yj+hrKf0OIupFYu7fmyU48dsukDjqQFaTl7mutqK35L6YASrQJVg
	 ITtABu+cVyYCud2N3puKYVNLVZOKPzoCguOELu2a71pbv9rOXGoW70c4SVejfbdnZRg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793916859;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
	 Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=ZOUsTfcBcuVJ6gLGMQ6tAEOI9CGBgTAWtYSuv6u4PGg=;
	b=zTx5Jhg53iW7NfihmxJRNgkQ/zzHEazc+sGq6XZa0p5Y5PNSOVgxQVLBcu7RusO1QLdK
	 qXJhf+7h2HO4vdZwJ4WQaMUCLsCbR1aZKm7cauRq9aZVos7qbmNXcs/Hjjct2Dj1mFLaO
	 dtXKEyMBxczLi24i2QGwTYWeNIotagqJ/jPUcNwC2Y+aZwTU8a34S2Z+6aNjacbn8oi8o
	 05oD0AatUTzDarrB9QNL4E5hb3zfszI+scNXtcAkZAp1NxIc93lieRLG/Pn6wvmfaVYJD
	 TBesBseEDpy6GZszeaenxYH4qpJD2LyrCXcLV99cQv81ntbIQw1o1Y1H+ezair1QIMQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=FqI5VcPT;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 8589A606A32C;
	Thu,  5 Nov 2026 22:14:19 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=FqI5VcPT
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.1
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793916853;
	b=C5YCW7WUupozhYxL0JwshXKg9eZKPwGfeeohrRWPjNp1ZuObI6N1KZGi2wYWLTg9QxN+
	 Ye56HUNXvAFsxY+x97TMInfdhGAo8IU2bJLAfTpx9KimpVh6ggk8AmBePEcH3GUDkBTRR
	 5jgiylS2R4Mqtc9OqmnJjRY0HK8plqfsGEet4+P9k8JufGvt/bayhmB/NWohv0Y0456cR
	 vdAE9Nsy5NRmkB+5eKnfxeSOqi6bhSYnLB6P+qIzfDokht+TS4GBl6XWJS5sj8YF10rXl
	 h1NX5SUQ9175zHN/a9Qb72JH5D4pRMrOgf6Hg+qF11hMWmBSu36niXj7a+BBtsdmgMQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793916853;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent:
	 Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=ZOUsTfcBcuVJ6gLGMQ6tAEOI9CGBgTAWtYSuv6u4PGg=;
	b=llT93MtL4geaJZ6sSjUdsO4FvykMZgDyeIidMewSS8C4BTBaLbn5Wa/vWDwD3IqFdUip
	 EcqjAU1k5c/61f1xZfBiYgZ03PE+F80cwvEfKEyczlofHTl1ZeQ85xJaIVLb8RXdH2FSq
	 NFyktop1AJ93Q2psaTymSZy5l7//fsoxENPQ77QrmN2kPKtSF6uR/JrxeEOBN9WWJUd4T
	 WHEcaWvbqSAJ+N3Fj3Yy6mLzWezjz3pFVCbKXhUQBUJzt9Uw7Kecy//+eofpM1uimwrb1
	 dnXn5S9OxxEHCi1E8424pd9jAJ/t7T5vIXU/PBbl9ViKyM+YuUBlNVG/YWESYLg+VXA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=FqI5VcPT;
	arc=none smtp.remote-ip=95.215.58.1
X-Received: from mta1.migadu.com (out-1.mta1.migadu.com [95.215.58.1])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D93D606A31B
	for <netdev@vger.kernel.org>; Thu,  5 Nov 2026 22:14:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4D93D606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=5zm3bZakGmybjvQK0MMBjwto+FXGetyeWyr+G3hY9W0=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1793916850; v=1; x=1794521650;
 b=FqI5VcPTNmLYhp+5oqltZz4rrqkX+tX5jzl5+t6tV/S+rQaXObybFlIaJEz0+ltRbV8ky7LJ
 7Ddwrr8Gjng0OLPqWqcTBY9+7PvFIirQCALkUdGQdW8pyxIdSYMjzgyPVoCaQi76sggiftfej47
 bBp4e63raCiPUhpSarMvsQSQ=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by smtp.migadu.com with ESMTPS id c05158efb375ae9f;
	Thu, 05 Nov 2026 22:14:09 +0000
X-Mizu-Trace-ID: c05158efb375ae9f
X-Migadu-Flow: FLOW_OUT
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
 Jiri Pirko <jiri@resnulli.us>, Milena Olech <milena.olech@intel.com>,
 Przemek Kitszel <przemyslaw.kitszel@intel.com>,
 Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net>,
 Michal Michalik <michal.michalik@intel.com>, linux-kernel@vger.kernel.org
X-In-Reply-To: <20261105131145.1010406-2-ivecera@redhat.com>