public inbox for linux-kernel@vger.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, milena.olech@intel.com,
	linux-kernel@vger.kernel.org, pabeni@redhat.com, kuba@kernel.org,
	mschmidt@redhat.com, Jan Glaza <jan.glaza@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: Re: [PATCH net v6 2/4] dpll: fix pin dump crash for rebound module
Date: Fri, 19 Jan 2024 16:16:39 +0100	[thread overview]
Message-ID: <ZaqSV-OjYPrSTbew@nanopsycho> (raw)
In-Reply-To: <20240119134304.576956-3-arkadiusz.kubalewski@intel.com>

Fri, Jan 19, 2024 at 02:43:02PM CET, arkadiusz.kubalewski@intel.com wrote:
>When a kernel module is unbound but the pin resources were not entirely
>freed (other kernel module instance of the same PCI device have had kept
>the reference to that pin), and kernel module is again bound, the pin
>properties would not be updated (the properties are only assigned when
>memory for the pin is allocated), prop pointer still points to the
>kernel module memory of the kernel module which was deallocated on the
>unbind.
>
>If the pin dump is invoked in this state, the result is a kernel crash.
>Prevent the crash by storing persistent pin properties in dpll subsystem,
>copy the content from the kernel module when pin is allocated, instead of
>using memory of the kernel module.
>
>Fixes: 9431063ad323 ("dpll: core: Add DPLL framework base functions")
>Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions")
>Reviewed-by: Jan Glaza <jan.glaza@intel.com>
>Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>

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

  reply	other threads:[~2024-01-19 15:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 13:43 [PATCH net v6 0/4] dpll: fix unordered unbind/bind registerer issues Arkadiusz Kubalewski
2024-01-19 13:43 ` [PATCH net v6 1/4] dpll: fix broken error path in dpll_pin_alloc(..) Arkadiusz Kubalewski
2024-01-19 13:43 ` [PATCH net v6 2/4] dpll: fix pin dump crash for rebound module Arkadiusz Kubalewski
2024-01-19 15:16   ` Jiri Pirko [this message]
2024-01-19 13:43 ` [PATCH net v6 3/4] dpll: fix userspace availability of pins Arkadiusz Kubalewski
2024-01-19 13:43 ` [PATCH net v6 4/4] dpll: fix register pin with unregistered parent pin Arkadiusz Kubalewski
2024-01-19 16:08 ` [PATCH net v6 0/4] dpll: fix unordered unbind/bind registerer issues Vadim Fedorenko
2024-01-22 11:23 ` 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=ZaqSV-OjYPrSTbew@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=jan.glaza@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=milena.olech@intel.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox