netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Asmaa Mnebhi <asmaa@nvidia.com>,
	davem@davemloft.net, edumazet@google.com, netdev@vger.kernel.org,
	cai.huoqing@linux.dev, brgl@bgdev.pl, chenhao288@hisilicon.com,
	huangguangbin2@huawei.com,
	David Thompson  <davthompson@nvidia.com>
Subject: Re: [PATCH net-next v1 1/1] mlxbf_gige: Fix kernel panic at shutdown
Date: Tue, 6 Jun 2023 10:29:21 -0700	[thread overview]
Message-ID: <20230606102921.653a4fd2@kernel.org> (raw)
In-Reply-To: <9df69dcc0554a3818689e30b06601d33fe37457c.camel@redhat.com>

On Tue, 06 Jun 2023 12:47:09 +0200 Paolo Abeni wrote:
> >  static void mlxbf_gige_shutdown(struct platform_device *pdev)
> >  {
> > -	struct mlxbf_gige *priv = platform_get_drvdata(pdev);
> > -
> > -	writeq(0, priv->base + MLXBF_GIGE_INT_EN);
> > -	mlxbf_gige_clean_port(priv);
> > +	mlxbf_gige_remove(pdev);
> >  }
> >  
> >  static const struct acpi_device_id __maybe_unused mlxbf_gige_acpi_match[] = {  
> 
> if the device goes through both shutdown() and remove(), the netdevice
> will go through unregister_netdevice() 2 times, which is wrong. Am I
> missing something relevant?

Good point, mlxbf_gige_remove() needs to check that the priv pointer
is not NULL.
-- 
pw-bot: cr

  reply	other threads:[~2023-06-06 17:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 18:24 [PATCH net-next v1 1/1] mlxbf_gige: Fix kernel panic at shutdown Asmaa Mnebhi
2023-06-05 23:15 ` Jakub Kicinski
2023-06-06 12:25   ` Asmaa Mnebhi
2023-06-06 10:47 ` Paolo Abeni
2023-06-06 17:29   ` Jakub Kicinski [this message]
2023-06-07 13:54     ` Asmaa Mnebhi

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=20230606102921.653a4fd2@kernel.org \
    --to=kuba@kernel.org \
    --cc=asmaa@nvidia.com \
    --cc=brgl@bgdev.pl \
    --cc=cai.huoqing@linux.dev \
    --cc=chenhao288@hisilicon.com \
    --cc=davem@davemloft.net \
    --cc=davthompson@nvidia.com \
    --cc=edumazet@google.com \
    --cc=huangguangbin2@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).