From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D392C76194 for ; Thu, 25 Jul 2019 14:03:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60E78217F4 for ; Thu, 25 Jul 2019 14:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387824AbfGYODz (ORCPT ); Thu, 25 Jul 2019 10:03:55 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:47001 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbfGYODy (ORCPT ); Thu, 25 Jul 2019 10:03:54 -0400 X-Originating-IP: 92.137.69.152 Received: from localhost (alyon-656-1-672-152.w92-137.abo.wanadoo.fr [92.137.69.152]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 7D0B5E0021; Thu, 25 Jul 2019 14:03:52 +0000 (UTC) Date: Thu, 25 Jul 2019 16:03:51 +0200 From: Alexandre Belloni To: Claudiu Manoil Cc: "David S . Miller" , netdev@vger.kernel.org, UNGLinuxDriver@microchip.com Subject: Re: [PATCH net] ocelot: Cancel delayed work before wq destruction Message-ID: <20190725140351.GT24911@piout.net> References: <1564061598-4440-1-git-send-email-claudiu.manoil@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1564061598-4440-1-git-send-email-claudiu.manoil@nxp.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 25/07/2019 16:33:18+0300, Claudiu Manoil wrote: > Make sure the delayed work for stats update is not pending before > wq destruction. > This fixes the module unload path. > The issue is there since day 1. > > Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") > > Signed-off-by: Claudiu Manoil Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c > index b71e4ecbe469..6932e615d4b0 100644 > --- a/drivers/net/ethernet/mscc/ocelot.c > +++ b/drivers/net/ethernet/mscc/ocelot.c > @@ -1818,6 +1818,7 @@ EXPORT_SYMBOL(ocelot_init); > > void ocelot_deinit(struct ocelot *ocelot) > { > + cancel_delayed_work(&ocelot->stats_work); > destroy_workqueue(ocelot->stats_queue); > mutex_destroy(&ocelot->stats_lock); > ocelot_ace_deinit(); > -- > 2.17.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com