All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Cc: netdev@vger.kernel.org, vadim.fedorenko@linux.dev,
	davem@davemloft.net, rrameshbabu@nvidia.com,
	linux-kernel@vger.kernel.org, pabeni@redhat.com, kuba@kernel.org,
	mschmidt@redhat.com
Subject: Re: [PATCH net v2] dpll: fix dpll_pin_on_pin_register() for multiple parent pins
Date: Wed, 24 Apr 2024 16:44:00 +0200	[thread overview]
Message-ID: <ZikasF4nwa5lhuDN@nanopsycho> (raw)
In-Reply-To: <20240424101636.1491424-1-arkadiusz.kubalewski@intel.com>

Wed, Apr 24, 2024 at 12:16:36PM CEST, arkadiusz.kubalewski@intel.com wrote:
>In scenario where pin is registered with multiple parent pins via
>dpll_pin_on_pin_register(..), all belonging to the same dpll device.
>A second call to dpll_pin_on_pin_unregister(..) would cause a call trace,
>as it tries to use already released registration resources (due to fix
>introduced in b446631f355e). In this scenario pin was registered twice,
>so resources are not yet expected to be release until each registered
>pin/pin pair is unregistered.
>
>Currently, the following crash/call trace is produced when ice driver is
>removed on the system with installed E810T NIC which includes dpll device:
>
>WARNING: CPU: 51 PID: 9155 at drivers/dpll/dpll_core.c:809 dpll_pin_ops+0x20/0x30
>RIP: 0010:dpll_pin_ops+0x20/0x30
>Call Trace:
> ? __warn+0x7f/0x130
> ? dpll_pin_ops+0x20/0x30
> dpll_msg_add_pin_freq+0x37/0x1d0
> dpll_cmd_pin_get_one+0x1c0/0x400
> ? __nlmsg_put+0x63/0x80
> dpll_pin_event_send+0x93/0x140
> dpll_pin_on_pin_unregister+0x3f/0x100
> ice_dpll_deinit_pins+0xa1/0x230 [ice]
> ice_remove+0xf1/0x210 [ice]
>
>Fix by adding a parent pointer as a cookie when creating a registration,
>also when searching for it. For the regular pins pass NULL, this allows to
>create separated registration for each parent the pin is registered with.
>
>Fixes: b446631f355e ("dpll: fix dpll_xa_ref_*_del() for multiple registrations")
>Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

Thanks!

  reply	other threads:[~2024-04-24 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24 10:16 [PATCH net v2] dpll: fix dpll_pin_on_pin_register() for multiple parent pins Arkadiusz Kubalewski
2024-04-24 14:44 ` Jiri Pirko [this message]
2024-04-25 15:40 ` 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=ZikasF4nwa5lhuDN@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rrameshbabu@nvidia.com \
    --cc=vadim.fedorenko@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.