mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kory Maincent <kory.maincent@bootlin.com>
To: "Paul Barker" <paul.barker.ct@bp.renesas.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Mikhail Ulyanov" <mikhail.ulyanov@cogentembedded.com>,
	"Sergei Shtylyov" <sergei.shtylyov@cogentembedded.com>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Claudiu Beznea" <claudiu.beznea.uj@bp.renesas.com>,
	netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Kory Maincent" <kory.maincent@bootlin.com>,
	"Sergey Shtylyov" <s.shtylyov@omp.ru>
Subject: [PATCH net v2 0/2] Fix missing rtnl lock in suspend path
Date: Thu, 23 Jan 2025 17:57:59 +0100	[thread overview]
Message-ID: <20250123-fix_missing_rtnl_lock_phy_disconnect-v2-0-e6206f5508ba@bootlin.com> (raw)

Fix the suspend path by ensuring the rtnl lock is held where required.
Calls to open, close and WOL operations must be performed under the
rtnl lock to prevent conflicts with ongoing ndo operations.

Discussion about this issue can be found here:
https://lore.kernel.org/netdev/20250120141926.1290763-1-kory.maincent@bootlin.com/

While working on the ravb fix, it was discovered that the sh_eth driver
has the same issue. This patch series addresses both drivers.

I do not have access to hardware for either of these MACs, so it would
be great if maintainers or others with the relevant boards could test
these fixes.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Changes in v2:
- Move the rtnl_lock before ravb_wol_setup() and ravb_wol_restore()
  instead of before the if condition.
- Link to v1: https://lore.kernel.org/r/20250122-fix_missing_rtnl_lock_phy_disconnect-v1-0-8cb9f6f88fd1@bootlin.com

---
Kory Maincent (2):
      net: ravb: Fix missing rtnl lock in suspend path
      net: sh_eth: Fix missing rtnl lock in suspend path

 drivers/net/ethernet/renesas/ravb_main.c | 14 ++++++++++++--
 drivers/net/ethernet/renesas/sh_eth.c    |  4 ++++
 2 files changed, 16 insertions(+), 2 deletions(-)
---
base-commit: b1754a69e7be48a64b3cdb0df60a96d97959da73
change-id: 20250122-fix_missing_rtnl_lock_phy_disconnect-fc1d6f5db705

Best regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


             reply	other threads:[~2025-01-23 17:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23 16:57 Kory Maincent [this message]
2025-01-23 16:58 ` [PATCH net v2 1/2] net: ravb: " Kory Maincent
2025-01-23 17:23   ` Paul Barker
2025-01-23 17:33     ` Kory Maincent
2025-01-27 10:28       ` Kory Maincent
2025-01-29 14:36         ` Claudiu Beznea
2025-01-23 16:58 ` [PATCH net v2 2/2] net: sh_eth: " Kory Maincent

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=20250123-fix_missing_rtnl_lock_phy_disconnect-v2-0-e6206f5508ba@bootlin.com \
    --to=kory.maincent@bootlin.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mikhail.ulyanov@cogentembedded.com \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=pabeni@redhat.com \
    --cc=paul.barker.ct@bp.renesas.com \
    --cc=s.shtylyov@omp.ru \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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

all inboxes | Powered by JetHome®