All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <stfomichev@gmail.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Stanislav Fomichev <sdf@fomichev.me>,
	netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com,
	Saeed Mahameed <saeed@kernel.org>
Subject: Re: [PATCH net-next v8 08/12] net: ethtool: try to protect all callback with netdev instance lock
Date: Thu, 27 Feb 2025 14:40:16 -0800	[thread overview]
Message-ID: <Z8Dp0Cm2oAWxCxXp@mini-arch> (raw)
In-Reply-To: <20250227094800.7ff48a71@fedora.home>

On 02/27, Maxime Chevallier wrote:
> Hi,
> 
> On Wed, 26 Feb 2025 13:11:04 -0800
> Stanislav Fomichev <sdf@fomichev.me> wrote:
> 
> > From: Jakub Kicinski <kuba@kernel.org>
> > 
> > Protect all ethtool callbacks and PHY related state with the netdev
> > instance lock, for drivers which want / need to have their ops
> > instance-locked. Basically take the lock everywhere we take rtnl_lock.
> > It was tempting to take the lock in ethnl_ops_begin(), but turns
> > out we actually nest those calls (when generating notifications).
> > 
> > Cc: Saeed Mahameed <saeed@kernel.org>
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
> > ---
> >  drivers/net/netdevsim/ethtool.c |  2 --
> >  net/dsa/conduit.c               | 16 +++++++++++++++-
> >  net/ethtool/cabletest.c         | 20 ++++++++++++--------
> >  net/ethtool/cmis_fw_update.c    |  7 ++++++-
> >  net/ethtool/features.c          |  6 ++++--
> >  net/ethtool/ioctl.c             |  6 ++++++
> >  net/ethtool/module.c            |  8 +++++---
> >  net/ethtool/netlink.c           | 12 ++++++++++++
> >  net/ethtool/phy.c               | 20 ++++++++++++++------
> >  net/ethtool/rss.c               |  2 ++
> >  net/ethtool/tsinfo.c            |  9 ++++++---
> >  net/sched/sch_taprio.c          |  5 ++++-
> >  12 files changed, 86 insertions(+), 27 deletions(-)
> 
> FWIW I've tested that patchset with various PHY-related ethtool ops as
> well as the module ops and didn't notice any issue or strangeness.
> 
> So to some extent,
> 
> Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

Thank you for testing!

  reply	other threads:[~2025-02-27 22:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26 21:10 [PATCH net-next v8 00/12] net: Hold netdev instance lock during ndo operations Stanislav Fomichev
2025-02-26 21:10 ` [PATCH net-next v8 01/12] net: hold netdev instance lock during ndo_open/ndo_stop Stanislav Fomichev
2025-02-26 21:10 ` [PATCH net-next v8 02/12] net: hold netdev instance lock during ndo_setup_tc Stanislav Fomichev
2025-02-26 21:10 ` [PATCH net-next v8 03/12] net: hold netdev instance lock during queue operations Stanislav Fomichev
2025-02-26 21:11 ` [PATCH net-next v8 04/12] net: hold netdev instance lock during rtnetlink operations Stanislav Fomichev
2025-02-26 21:11 ` [PATCH net-next v8 05/12] net: hold netdev instance lock during ioctl operations Stanislav Fomichev
2025-02-26 21:11 ` [PATCH net-next v8 06/12] net: hold netdev instance lock during sysfs operations Stanislav Fomichev
2025-02-26 21:11 ` [PATCH net-next v8 07/12] net: hold netdev instance lock during ndo_bpf Stanislav Fomichev
2025-02-26 21:11 ` [PATCH net-next v8 08/12] net: ethtool: try to protect all callback with netdev instance lock Stanislav Fomichev
2025-02-27  8:48   ` Maxime Chevallier
2025-02-27 22:40     ` Stanislav Fomichev [this message]
2025-02-26 21:11 ` [PATCH net-next v8 09/12] net: replace dev_addr_sem " Stanislav Fomichev
2025-02-26 21:11 ` [PATCH net-next v8 10/12] net: add option to request " Stanislav Fomichev
2025-02-26 21:11 ` [PATCH net-next v8 11/12] docs: net: document new locking reality Stanislav Fomichev
2025-02-26 21:11 ` [PATCH net-next v8 12/12] eth: bnxt: remove most dependencies on RTNL Stanislav Fomichev
2025-02-28  1:27 ` [PATCH net-next v8 00/12] net: Hold netdev instance lock during ndo operations Jakub Kicinski

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=Z8Dp0Cm2oAWxCxXp@mini-arch \
    --to=stfomichev@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeed@kernel.org \
    --cc=sdf@fomichev.me \
    /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.