[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<CH2PR12MB3895172507E1D42BBD5D4AB9D753A@CH2PR12MB3895.namprd12.prod.outlook.com>
Date: Wed, 7 Jun 2023 13:54:52 +0000
From: Asmaa Mnebhi <asmaa@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
CC: "davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
<edumazet@...gle.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"cai.huoqing@...ux.dev" <cai.huoqing@...ux.dev>, "brgl@...ev.pl"
<brgl@...ev.pl>, "chenhao288@...ilicon.com" <chenhao288@...ilicon.com>,
"huangguangbin2@...wei.com" <huangguangbin2@...wei.com>, David Thompson
<davthompson@...dia.com>
Subject: RE: [PATCH net-next v1 1/1] mlxbf_gige: Fix kernel panic at shutdown
> > > 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.
Thank you all for your feedback. I will fix it shortly along with net-next -> net.
Powered by blists - more mailing lists