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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 6FA67C76186 for ; Mon, 29 Jul 2019 20:14:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38EA9205F4 for ; Mon, 29 Jul 2019 20:14:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564431261; bh=un2I5Up+R3N+egRplOmM+AVXuWvtxMCyhBqAnnhfpOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Yvc6WBgn2JnRojcOCknSBjYgAuQ7qjPuI69lcuF4KAAO2OxT9NM11G7Feu6wCKLP1 7SSjsgrC5GwpGZr9AuNdBfTA+XZKc3nshZ6IxfLGGMSsU9IRuEgnreY8doQUf+SJeD slq9LthaeelElqtw2lJBISxGQ2hXVusxcJXZx1vI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728279AbfG2T2M (ORCPT ); Mon, 29 Jul 2019 15:28:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:40848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729977AbfG2T2I (ORCPT ); Mon, 29 Jul 2019 15:28:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B6BE21655; Mon, 29 Jul 2019 19:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428487; bh=un2I5Up+R3N+egRplOmM+AVXuWvtxMCyhBqAnnhfpOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NLfaDwdFZRI6PDmkrAdzIFh5Pu+Tn5PkPa2vfWcmjxdl62Jar04zj8SLvxqDdR/3d N49CtT4FRX9c5bgc++lfBH+AF7oID9nqyV++C4thzO9kzcqh5+AwJZaAbC13k6muqo cR15tozJ4fbRSfjgOb1r25msuQHIXWD43z8oInCM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wen Gong , Kalle Valo , Sasha Levin Subject: [PATCH 4.14 091/293] ath10k: destroy sdio workqueue while remove sdio module Date: Mon, 29 Jul 2019 21:19:42 +0200 Message-Id: <20190729190831.576184783@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ Upstream commit 3ed39f8e747a7aafeec07bb244f2c3a1bdca5730 ] The workqueue need to flush and destory while remove sdio module, otherwise it will have thread which is not destory after remove sdio modules. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/sdio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index c6440d28ab48..0a1248ebccf5 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -2076,6 +2076,9 @@ static void ath10k_sdio_remove(struct sdio_func *func) cancel_work_sync(&ar_sdio->wr_async_work); ath10k_core_unregister(ar); ath10k_core_destroy(ar); + + flush_workqueue(ar_sdio->workqueue); + destroy_workqueue(ar_sdio->workqueue); } static const struct sdio_device_id ath10k_sdio_devices[] = { -- 2.20.1