From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Ivan Vecera <ivecera@redhat.com>, netdev@vger.kernel.org
Cc: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Michal Michalik <michal.michalik@intel.com>,
Milena Olech <milena.olech@intel.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] dpll: Prevent duplicate registrations
Date: Wed, 21 Jan 2026 17:18:58 +0000 [thread overview]
Message-ID: <063f95d2-e29f-416d-8226-49a21b7c8dcd@linux.dev> (raw)
In-Reply-To: <20260121130012.112606-1-ivecera@redhat.com>
On 21/01/2026 13:00, Ivan Vecera wrote:
> Modify the internal registration helpers dpll_xa_ref_{dpll,pin}_add()
> to reject duplicate registration attempts.
>
> Previously, if a caller attempted to register the same pin multiple
> times (with the same ops, priv, and cookie) on the same device, the core
> silently increments the reference count and return success. This behavior
> is incorrect because if the caller makes these duplicate registrations
> then for the first one dpll_pin_registration is allocated and for others
> the associated dpll_pin_ref.refcount is incremented. During the first
> unregistration the associated dpll_pin_registration is freed and for
> others WARN is fired.
>
> Fix this by updating the logic to return `-EEXIST` if a matching
> registration is found to enforce a strict "register once" policy.
>
> Fixes: 9431063ad323 ("dpll: core: Add DPLL framework base functions")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
> drivers/dpll/dpll_core.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
next prev parent reply other threads:[~2026-01-21 17:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 13:00 [PATCH net] dpll: Prevent duplicate registrations Ivan Vecera
2026-01-21 13:37 ` Kubalewski, Arkadiusz
2026-01-21 17:18 ` Vadim Fedorenko [this message]
2026-01-22 16:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=063f95d2-e29f-416d-8226-49a21b7c8dcd@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.michalik@intel.com \
--cc=milena.olech@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox