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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 319F5C04A6A for ; Wed, 16 Aug 2023 03:13:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241384AbjHPDMh convert rfc822-to-8bit (ORCPT ); Tue, 15 Aug 2023 23:12:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241541AbjHPDMd (ORCPT ); Tue, 15 Aug 2023 23:12:33 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 07305E6B for ; Tue, 15 Aug 2023 20:12:31 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 37G3C3dH4011173, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 37G3C3dH4011173 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Aug 2023 11:12:03 +0800 Received: from RTEXDAG01.realtek.com.tw (172.21.6.100) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Wed, 16 Aug 2023 11:12:23 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG01.realtek.com.tw (172.21.6.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 16 Aug 2023 11:12:22 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Wed, 16 Aug 2023 11:12:22 +0800 From: Ping-Ke Shih To: Dmitry Antipov CC: Kalle Valo , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH] wifi: rtw88: add missing call to cancel_work_sync() Thread-Topic: [PATCH] wifi: rtw88: add missing call to cancel_work_sync() Thread-Index: AQHZz4TiR3KqrXrqz0KJOt5g7uGRB6/sPtWw Date: Wed, 16 Aug 2023 03:12:22 +0000 Message-ID: <0c3dbbdca1a2465fbbb9c8ea187c52b7@realtek.com> References: <20230815142908.92257-1-dmantipov@yandex.ru> In-Reply-To: <20230815142908.92257-1-dmantipov@yandex.ru> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXDAG01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Dmitry Antipov > Sent: Tuesday, August 15, 2023 10:28 PM > To: Ping-Ke Shih > Cc: Kalle Valo ; linux-wireless@vger.kernel.org; Dmitry Antipov > Subject: [PATCH] wifi: rtw88: add missing call to cancel_work_sync() > > Add missing call to 'cancel_work_sync()' in 'rtw_core_stop()'. > > Fixes: 5c831644e1f4 ("rtw88: handle and recover when firmware crash") > Signed-off-by: Dmitry Antipov rtwdev->fw_recovery_work is used to restart hardware when firmware reports things get abnormal. The calling flow will be fw_ recovery_work() -> ... -> rtw_enter_ips() -> rtw_core_stop() -> cancel_work_sync(&rtwdev->fw_recovery_work) /* wait for self to finish */ It would be safe to add this cancel_work_sync(&rtwdev->fw_recovery_work) in rtw_core_deinit()? So, NACK. Ping-Ke