[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211017123622.nfyis7o235tb2qad@pengutronix.de>
Date: Sun, 17 Oct 2021 14:36:22 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Dongliang Mu <mudongliangabcd@...il.com>
Cc: Appana Durga Kedareswara rao <appana.durga.rao@...inx.com>,
Naga Sureshkumar Relli <naga.sureshkumar.relli@...inx.com>,
Wolfgang Grandegger <wg@...ndegger.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Michal Simek <michal.simek@...inx.com>,
linux-can@...r.kernel.org,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
linux-arm-kernel@...ts.infradead.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] driver: net: can: delete napi if register_candev fails
On 13.10.2021 13:21:09, Dongliang Mu wrote:
> On Wed, Oct 13, 2021 at 12:04 PM Dongliang Mu <mudongliangabcd@...il.com> wrote:
> >
> > If register_candev fails, xcan_probe does not clean the napi
> > created by netif_napi_add.
> >
>
> It seems the netif_napi_del operation is done in the free_candev
> (free_netdev precisely).
>
> list_for_each_entry_safe(p, n, &dev->napi_list, dev_list)
> netif_napi_del(p);
>
> And list_add_rcu(&napi->dev_list, &dev->napi_list) is done in the
> netif_napi_add.
>
> Therefore, I suggest removing "netif_napi_del" operation in the
> xcan_remove to match probe and remove function.
Sounds reasonable, can you create a patch for this.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists