mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Wentao Liang <vulab@iscas.ac.cn>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH RESEND] net: stmmac: drop the runtime PM reference on probe failure
Date: Tue, 3 Nov 2026 11:39:50 +0100	[thread overview]
Message-ID: <b38f9573-4674-4766-9a16-799888f865e9@kernel.org> (raw)
In-Reply-To: <20261103102914.1341121-1-vulab@iscas.ac.cn>

On 03/11/2026 11:29, Wentao Liang wrote:
> __stmmac_dvr_probe() takes a runtime PM reference with
> pm_runtime_get_noresume() and enables runtime PM before registering the
> MDIO bus.  The reference is only dropped on the success path, so a
> failure of the MDIO, PCS, phylink, devlink or netdev registration leaves
> the usage counter elevated.  The device is never bound in that case, so
> stmmac_dvr_remove() never runs to release it.
> 
> Drop the reference and disable runtime PM again on the common error path.
> Only disable runtime PM if this driver enabled it, because PCI devices
> already have it enabled by the PCI core.
> 
> Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex

Implement comments you received, instead of resending.

Best regards,
Krzysztof

      parent reply	other threads:[~2026-11-03 10:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 10:29 Wentao Liang
2026-11-03 10:35 ` netdev-bot+sinfo
2026-11-03 10:39 ` Krzysztof Kozlowski [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=b38f9573-4674-4766-9a16-799888f865e9@kernel.org \
    --to=krzk@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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®