netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antoine Tenart <antoine.tenart@bootlin.com>
To: Matteo Croce <mcroce@redhat.com>
Cc: Antoine Tenart <antoine.tenart@bootlin.com>,
	netdev <netdev@vger.kernel.org>,
	Miquel Raynal <miquel.raynal@free-electrons.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net] mvpp2: fix panic on module removal
Date: Thu, 1 Aug 2019 14:00:38 +0200	[thread overview]
Message-ID: <20190801120038.GA14470@kwain> (raw)
In-Reply-To: <CAGnkfhyx7MHaG=YNhS7VrzsBqhVCPw5VeHPM7SFpiLeq3cb5Gw@mail.gmail.com>

On Thu, Aug 01, 2019 at 01:46:39PM +0200, Matteo Croce wrote:
> On Thu, Aug 1, 2019 at 9:18 AM Antoine Tenart
> <antoine.tenart@bootlin.com> wrote:
> > On Wed, Jul 31, 2019 at 08:31:16PM +0200, Matteo Croce wrote:
> > >
> > > diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > > index c51f1d5b550b..5002d51fc9d6 100644
> > > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> > > @@ -5760,7 +5760,6 @@ static int mvpp2_remove(struct platform_device *pdev)
> > >       mvpp2_dbgfs_cleanup(priv);
> > >
> > >       flush_workqueue(priv->stats_queue);
> > > -     destroy_workqueue(priv->stats_queue);
> > >
> > >       fwnode_for_each_available_child_node(fwnode, port_fwnode) {
> > >               if (priv->port_list[i]) {
> > > @@ -5770,6 +5769,8 @@ static int mvpp2_remove(struct platform_device *pdev)
> > >               i++;
> > >       }
> >
> > Shouldn't you also move flush_workqueue() here?
> 
> I think that that flush it's unneeded at all, as all port remove calls
> cancel_delayed_work_sync().
> 
> I tried removing it and it doesn't crash on rmmod.

I was wondering this, and looking at the documentation it seems to me
removing flush_workqueue() should be fine.

Thanks!
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-08-01 12:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 18:31 [PATCH net] mvpp2: fix panic on module removal Matteo Croce
2019-08-01  7:18 ` Antoine Tenart
2019-08-01 11:46   ` Matteo Croce
2019-08-01 12:00     ` Antoine Tenart [this message]
2019-08-05 17:58 ` David Miller
2019-08-05 18:17   ` Matteo Croce
2019-08-05 20:54     ` 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=20190801120038.GA14470@kwain \
    --to=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcroce@redhat.com \
    --cc=miquel.raynal@free-electrons.com \
    --cc=netdev@vger.kernel.org \
    /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).