Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3D85C433F5 for ; Mon, 6 Dec 2021 15:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442598AbhLFPzm (ORCPT ); Mon, 6 Dec 2021 10:55:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390483AbhLFPm0 (ORCPT ); Mon, 6 Dec 2021 10:42:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC67BC08ECBC; Mon, 6 Dec 2021 07:26:35 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 89CB761316; Mon, 6 Dec 2021 15:26:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E6A4C34901; Mon, 6 Dec 2021 15:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1638804395; bh=YYgxScB1CUBNBeQPdB14mxpNRHa9QU+EURaK/J9b4H0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nKhDTgtsTDl8AliBzvsNZDURj0VAip9MwSHH+zsWZHi6/I1AYeXvsnAu+NSNrXS/h HB8M0hnCJsfpmIcWH7yQR3oKGrICoYC91S+AVpQX8qug//K/mGGCzp+RjI2tYN58h+ SD0QFYRpUhZLc4qO/R0BLfVQSsHaaD6fK56WNVxk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dongliang Mu , "David S. Miller" Subject: [PATCH 5.15 130/207] dpaa2-eth: destroy workqueue at the end of remove function Date: Mon, 6 Dec 2021 15:56:24 +0100 Message-Id: <20211206145614.733328734@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211206145610.172203682@linuxfoundation.org> References: <20211206145610.172203682@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dongliang Mu commit f4a8adbfe4841491b60c14fe610571e1422359f9 upstream. The commit c55211892f46 ("dpaa2-eth: support PTP Sync packet one-step timestamping") forgets to destroy workqueue at the end of remove function. Fix this by adding destroy_workqueue before fsl_mc_portal_free and free_netdev. Fixes: c55211892f46 ("dpaa2-eth: support PTP Sync packet one-step timestamping") Signed-off-by: Dongliang Mu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -4538,6 +4538,8 @@ static int dpaa2_eth_remove(struct fsl_m fsl_mc_portal_free(priv->mc_io); + destroy_workqueue(priv->dpaa2_ptp_wq); + dev_dbg(net_dev->dev.parent, "Removed interface %s\n", net_dev->name); free_netdev(net_dev);