From: Jacob Keller <jacob.e.keller@intel.com>
To: Sasha Levin <sashal@kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>
Cc: Jiri Pirko <jiri@nvidia.com>, Ido Schimmel <idosch@nvidia.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"David S . Miller" <davem@davemloft.net>, <edumazet@google.com>,
<pabeni@redhat.com>, <jiri@resnulli.us>,
<michal.wilczynski@intel.com>, <shayd@nvidia.com>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH AUTOSEL 6.1 01/26] devlink: remove reload failed checks in params get/set callbacks
Date: Fri, 8 Sep 2023 14:44:43 -0700 [thread overview]
Message-ID: <44f1815e-9949-9782-97ee-60c767709c31@intel.com> (raw)
In-Reply-To: <20230908181806.3460164-1-sashal@kernel.org>
On 9/8/2023 11:17 AM, Sasha Levin wrote:
> From: Jiri Pirko <jiri@nvidia.com>
>
> [ Upstream commit 633d76ad01ad0321a1ace3e5cc4fed06753d7ac4 ]
>
> The checks in question were introduced by:
> commit 6b4db2e528f6 ("devlink: Fix use-after-free after a failed reload").
> That fixed an issue of reload with mlxsw driver.
>
> Back then, that was a valid fix, because there was a limitation
> in place that prevented drivers from registering/unregistering params
> when devlink instance was registered.
>
> It was possible to do the fix differently by changing drivers to
> register/unregister params in appropriate places making sure the ops
> operate only on memory which is allocated and initialized. But that,
> as a dependency, would require to remove the limitation mentioned above.
>
> Eventually, this limitation was lifted by:
> commit 1d18bb1a4ddd ("devlink: allow registering parameters after the instance")
>
> Also, the alternative fix (which also fixed another issue) was done by:
> commit 74cbc3c03c82 ("mlxsw: spectrum_acl_tcam: Move devlink param to TCAM code").
>
> Therefore, the checks are no longer relevant. Each driver should make
> sure to have the params registered only when the memory the ops
> are working with is allocated and initialized.
>
> So remove the checks.
>
> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
> Reviewed-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
I believe my comments on the v5.4 backport apply here as well.
Thanks,
Jake
prev parent reply other threads:[~2023-09-08 21:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 18:17 [PATCH AUTOSEL 6.1 01/26] devlink: remove reload failed checks in params get/set callbacks Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 03/26] ice: Don't tx before switchdev is fully configured Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 09/26] can: sun4i_can: Add acceptance register quirk Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 10/26] can: sun4i_can: Add support for the Allwinner D1 Sasha Levin
2023-09-11 9:47 ` Pavel Machek
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 11/26] net: Use sockaddr_storage for getsockopt(SO_PEERNAME) Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 12/26] net/ipv4: return the real errno instead of -EINVAL Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 15/26] netlink: convert nlk->flags to atomic flags Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 18/26] alx: fix OOB-read compiler warning Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 19/26] wifi: mac80211: check S1G action frame size Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 20/26] netfilter: ebtables: fix fortify warnings in size_entry_mwt() Sasha Levin
2023-09-08 18:17 ` [PATCH AUTOSEL 6.1 21/26] wifi: cfg80211: reject auth/assoc to AP with our address Sasha Levin
2023-09-08 18:18 ` [PATCH AUTOSEL 6.1 22/26] wifi: cfg80211: ocb: don't leave if not joined Sasha Levin
2023-09-08 18:18 ` [PATCH AUTOSEL 6.1 23/26] wifi: mac80211: check for station first in client probe Sasha Levin
2023-09-08 21:44 ` Jacob Keller [this message]
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=44f1815e-9949-9782-97ee-60c767709c31@intel.com \
--to=jacob.e.keller@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.wilczynski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashal@kernel.org \
--cc=shayd@nvidia.com \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).