All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Wei Fang <wei.fang@nxp.com>, Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Fugang Duan <fugang.duan@nxp.com>,
	Chuhong Yuan <hslester96@gmail.com>,
	netdev@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH net] net: fec: Better handle pm_runtime_get() failing in .remove()
Date: Wed, 10 May 2023 23:41:20 +0200	[thread overview]
Message-ID: <461cd40d-1576-419b-978e-1a195cd3531c@lunn.ch> (raw)
In-Reply-To: <20230510200020.1534610-1-u.kleine-koenig@pengutronix.de>

On Wed, May 10, 2023 at 10:00:20PM +0200, Uwe Kleine-König wrote:
> In the (unlikely) event that pm_runtime_get() (disguised as
> pm_runtime_resume_and_get()) fails, the remove callback returned an
> error early. The problem with this is that the driver core ignores the
> error value and continues removing the device. This results in a
> resource leak. Worse the devm allocated resources are freed and so if a
> callback of the driver is called later the register mapping is already
> gone which probably results in a crash.
> 
> Fixes: a31eda65ba21 ("net: fec: fix clock count mis-match")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2023-05-10 21:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 20:00 [PATCH net] net: fec: Better handle pm_runtime_get() failing in .remove() Uwe Kleine-König
2023-05-10 21:41 ` Andrew Lunn [this message]
2023-05-12  1:20 ` 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=461cd40d-1576-419b-978e-1a195cd3531c@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fugang.duan@nxp.com \
    --cc=hslester96@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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 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.