From: Andrew Lunn <andrew@lunn.ch>
To: Jeremy Linton <jeremy.linton@arm.com>
Cc: netdev@vger.kernel.org, steve.glendinning@shawell.net,
matt.sealey@arm.com, davem@davemloft.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: smsc911x: Fix unload crash when link is up
Date: Tue, 6 Mar 2018 16:23:45 +0100 [thread overview]
Message-ID: <20180306152345.GD30557@lunn.ch> (raw)
In-Reply-To: <20180306150006.31512-1-jeremy.linton@arm.com>
> This is caused by the mdiobus being unregistered/free'd
> and the code in phy_detach() attempting to manipulate mdio
> related structures from unregister_netdev() calling close()
>
> To fix this, we delay the mdiobus teardown until after
> the netdev is deregistered.
>
> Reported-by: Matt Sealey <matt.sealey@arm.com>
> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
> ---
> drivers/net/ethernet/smsc/smsc911x.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
> index 012fb66eed8d..f0afb88d7bc2 100644
> --- a/drivers/net/ethernet/smsc/smsc911x.c
> +++ b/drivers/net/ethernet/smsc/smsc911x.c
> @@ -2335,14 +2335,14 @@ static int smsc911x_drv_remove(struct platform_device *pdev)
> pdata = netdev_priv(dev);
> BUG_ON(!pdata);
> BUG_ON(!pdata->ioaddr);
> - WARN_ON(dev->phydev);
Hi Jeremy
I assume this WARN_ON() also fired? It would be good to comment about
why you removed it, that the code now handles that case.
Apart from that
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2018-03-06 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 15:00 [PATCH] net: smsc911x: Fix unload crash when link is up Jeremy Linton
2018-03-06 15:23 ` Andrew Lunn [this message]
2018-03-06 15:40 ` Jeremy Linton
2018-03-07 18:23 ` David Miller
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=20180306152345.GD30557@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=jeremy.linton@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.sealey@arm.com \
--cc=netdev@vger.kernel.org \
--cc=steve.glendinning@shawell.net \
/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.