Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7234029ybi; Thu, 1 Aug 2019 05:16:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoV0Mne1u6rckMr6Kt/2aawSM6pSVnM6KoRLsfz2aVY+PFxXJtthTQAX6j0AlXA4JDur+p X-Received: by 2002:a62:2aca:: with SMTP id q193mr54294305pfq.209.1564661788310; Thu, 01 Aug 2019 05:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564661788; cv=none; d=google.com; s=arc-20160816; b=xyAOCQ4Nsczi3QODbtVDVO26kR0yaScQ4+x76w5jdzMzaE9ekC43t4M7PoU3clNoCu gUqOGzoJBCoA5w1G/DxMpDVft8lzjOnD9dv3WLkIcoeEnyXjStGKbsUHAnR63GhCP45+ YDM9mcdtX1IJwo9LXmzhsd4aZSEyNZrQcj2sxLWvuaEpZccHY+97uICeR39IuHqfbYbO jq8PasCDRJWmYjduoXIxaA2HP/lqaFoA6TfRxnehcw1Gm+KznOmayaGqNypYzLg8Fu+K KwCTc+zf1foqez83lAPpmghDUKWRxLnew8stszx6pa7dGe69UWT/9lnUqiuxAq6Xlzf8 SC9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=DspJ3ewxUfYaZ1Ly4gjm9ZdLqvnu2VMQSeQE9uco6II=; b=AcUA3NxxIloiOcPiX7x5cAj4W0kee8sE2eUcQM0+HdJnIMiBO3KKQue68Z2N6FndOj WJF0bNfxKcdxq3sluyLjKkNPTodbQhE0dHLfzYHYn1ArZ2aCYM1jN3k4qtCgsQXqdT0b VMqJD/nYeedFKWR9XXIlUFSa0MmEMzA6VCzADutLRYxy/gky+PNeSZ7EA0n7dv0F0oJk qyJly/iT+u0YWe5Dyb9TARc5W3L1iBATPFSLSBsK5MOCxyo6jQ6pWbM2CGU/deFCQVva Bl1tK4QZSvyLmVHUAkisZs50C0jZwujSYpJqjufuV75f5fIw5moyQNX61fqOSQS3E7Ol tpzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si26734116pgz.39.2019.08.01.05.16.12; Thu, 01 Aug 2019 05:16:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731138AbfHAMAl (ORCPT + 99 others); Thu, 1 Aug 2019 08:00:41 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:36783 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727455AbfHAMAl (ORCPT ); Thu, 1 Aug 2019 08:00:41 -0400 X-Originating-IP: 86.250.200.211 Received: from localhost (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: antoine.tenart@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C464960006; Thu, 1 Aug 2019 12:00:38 +0000 (UTC) Date: Thu, 1 Aug 2019 14:00:38 +0200 From: Antoine Tenart To: Matteo Croce Cc: Antoine Tenart , netdev , Miquel Raynal , LKML , Lorenzo Bianconi , Maxime Chevallier , "David S. Miller" Subject: Re: [PATCH net] mvpp2: fix panic on module removal Message-ID: <20190801120038.GA14470@kwain> References: <20190731183116.4791-1-mcroce@redhat.com> <20190801071801.GF3579@kwain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 01, 2019 at 01:46:39PM +0200, Matteo Croce wrote: > On Thu, Aug 1, 2019 at 9:18 AM Antoine Tenart > 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