Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3982979ybi; Mon, 29 Jul 2019 16:51:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaj829ZG0uEMI4YHbkICTGPXObrxtNOAXy76ieQoMPkgDO8CvVhzXeZUyTwIdFHXWVbg+1 X-Received: by 2002:a62:4d85:: with SMTP id a127mr13712970pfb.148.1564444275820; Mon, 29 Jul 2019 16:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564444275; cv=none; d=google.com; s=arc-20160816; b=GrLe6xkzP++kXr5X4LK6XfY22xZlPJ1hd/JseqUvTWSPSxwdvS5YFYMJOGhF5IM81y Mnf9yUnOw7yvbghWsaYXyXshkfKMspjyGUPRiIBnhKSinCyq60TkRxoJbDOp14baPIJ1 dwCpw1ezrbJajkiyMTVrgtEfcRFydnJaiRHik/7hIiZ+hzw4XahJT9P9V1zVG6fLwDkq 8ZVUc2ZUNQwgy4KKVcJw9Q/1gM6Mafgo1vbKPS1SuflyUBU98jGgPyMZiLBLzUgJVYSX 56u6GjT+QBodZJz1DodYb8nXjHeHewQpaAy/FwtZ/chDmZxaMQKqvwg4zFY2g+rQ/rnw RQBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lwzjd0jAn19Nr4AdIvsCIx5QeQu1mO4P6iIfmhde0Ko=; b=l83ufLP5L6KGzbUxQ7RM7f/jNpQxgO+C5OJGknMAxCCjjFtWK496D4iDT9PC3VsxHU fy6eAMltAFLIoWda/1Ul3qsYNLyX3wBarodLT3krTfisKuq6UhyLG6h/RXSNQmxUQcMq qR+fg9nkE8NkYEEiUWjZLrRPdsovNLEdQh4n9IAnyTqWHRHy6a9X1HHDtusyOtTz/1ex oNtunvqDd1eVclY1tzdwbdKPaQC7ns+ojOGD9eeBA1U3R1BMVAm1fPk69zbQHsOn3vco 1J/e0wlkiQ3X7mmbSKHCJjoidsV4KQIF81RGtsvjLhZr7VT3x+xgpN17PTmf/UjGagQd kGxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NLfaDwdF; 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 65si26542714plf.368.2019.07.29.16.51.00; Mon, 29 Jul 2019 16:51:15 -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; dkim=pass header.i=@kernel.org header.s=default header.b=NLfaDwdF; 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 S1728718AbfG2T2M (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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