All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Marek Behún" <kabel@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH net] phylib: fix potential use-after-free
Date: Thu, 20 Jan 2022 01:27:39 +0100	[thread overview]
Message-ID: <Yeise7Fs/PCxONId@lunn.ch> (raw)
In-Reply-To: <20220119162748.32418-1-kabel@kernel.org>

On Wed, Jan 19, 2022 at 05:27:48PM +0100, Marek Behún wrote:
> Commit bafbdd527d56 ("phylib: Add device reset GPIO support") added call
> to phy_device_reset(phydev) after the put_device() call in phy_detach().
> 
> The comment before the put_device() call says that the phydev might go
> away with put_device().
> 
> Fix potential use-after-free by calling phy_device_reset() before
> put_device().
> 
> Fixes: bafbdd527d56 ("phylib: Add device reset GPIO support")
> Signed-off-by: Marek Behún <kabel@kernel.org>

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

    Andrew

  reply	other threads:[~2022-01-20  0:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 16:27 [PATCH net] phylib: fix potential use-after-free Marek Behún
2022-01-20  0:27 ` Andrew Lunn [this message]
2022-01-21  6:00 ` 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=Yeise7Fs/PCxONId@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kabel@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=sergei.shtylyov@cogentembedded.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.