Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp569129rwd; Sun, 14 May 2023 02:18:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58N8LyqftwjTJ4785VED6JW0vUBalDUylPTvw7sQtPpCE0U+N+IoF7yXOCmpgh/S5tu8fe X-Received: by 2002:a17:902:f690:b0:1ab:29bc:bd87 with SMTP id l16-20020a170902f69000b001ab29bcbd87mr36581481plg.35.1684055937793; Sun, 14 May 2023 02:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684055937; cv=none; d=google.com; s=arc-20160816; b=QSYv2VZuFpEo1JtXTH5fyOKvI9EUOQyeTBdVqyE4djJ7WPGzK0JQ5FsI4/3GACXguh loDjvmW6ldXESoS1nqSAuX2fP+hn3dl3lAaqGbDeSECr7e0EyqgM9inL07C/8D86/p6d FK3o2pnlQ6AjBHXrfFYXQIuhKStbBINAxHioZJvW9poqhHX0QNZei6JcpM47wihebGZn O/WesF5r8f9sJnjalcetOepHZPXQOIkD4Zgy80XYIxCv1gIa6E4tSewvEeQNVtfCamkp ayK2hm7LG8ssrHoTsu0LaJXMiCz5PCUEyy60sA7fdjlD9MvsAQ1750Jp/Z5hdPDt/faP WY/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3M858biB7IFZ3ttCmQ3faw7aIarAB07I2dN8/1HTnGc=; b=hkmn713Id5Ve8RQN9rcWvJMESnc7C3J7eMMWO+n2/ZVniaEn1QR51a8sxDZkdqYPJj XUKXK56yA/MK3rgXCutZYPw90gJSoAkwir7K4oQJxAoQ21jSLicEmmrbcHYWG2xz8yy2 srArbEpTyv3sjK0oOhZwjXBkqRUiNzgXy0iAChAA4kZW2MURBfNrpHmwzw4+mm0nrn0y CfH6QE+KpyYQjX2VqKq+yZPudxqW1CcxxAyaGK6u/goGsss7NuGB8WcuYGv/BYnYvF4G N26Vw4qt4iqFy9+omdCPzcbL//jr2SZ4U8J2Ad1kKuuNwSeuBLNiIWwBDdBjiKaz6l2q DVmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AgQDX2kL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lr7-20020a17090b4b8700b0025281755f55si9497017pjb.43.2023.05.14.02.18.39; Sun, 14 May 2023 02:18:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AgQDX2kL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235051AbjENJQb (ORCPT + 61 others); Sun, 14 May 2023 05:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234887AbjENJQ1 (ORCPT ); Sun, 14 May 2023 05:16:27 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 450771BE5 for ; Sun, 14 May 2023 02:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684055784; x=1715591784; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Mjj+kJ6d5lwyILzh4rqwz+7vUHyuSIBqSmc0gWSmtlQ=; b=AgQDX2kLcplsJPh7i7EP+rKjQ+mldQDkzxdezYJf1rYSCWNs0EjQfQ8Z KLf3wcex3vVKu0U+T3mQNB0BdiE9VQfurpGNvk/HBWIy8bqmiQG1s/7OK xZ6tOWz2dd+ZEcMLaA+Hr4C85hr9agA+SxAZfmWTg0gzStueYlOA0B5jo aZTMPDXrELuKZzZ1eZ2sqE5WDzHD7Ux2itm8Kb5/bJ/BWTxBjbWizWrVc /Vmwcy1nQqZFFhya+yoocWvc9eOJS5May4XbLZwxXSbKT3j4DLY1FSw7w zNyOFPM2HA5erLlGsaouZHsMDeXQrBC1M+bn8iP5np7lWAmv7MoqwdylX w==; X-IronPort-AV: E=McAfee;i="6600,9927,10709"; a="340366835" X-IronPort-AV: E=Sophos;i="5.99,274,1677571200"; d="scan'208";a="340366835" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2023 02:16:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10709"; a="731300356" X-IronPort-AV: E=Sophos;i="5.99,274,1677571200"; d="scan'208";a="731300356" Received: from seran-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.239.223]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2023 02:16:21 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH wireless 03/12] wifi: iwlwifi: mvm: fix cancel_delayed_work_sync() deadlock Date: Sun, 14 May 2023 12:15:46 +0300 Message-Id: <20230514120631.b1813c823b4d.I9d20cc06d24fa40b6774d3dd95ea5e2bf8dd015b@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230514091555.168392-1-gregory.greenman@intel.com> References: <20230514091555.168392-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg Lockdep points out that we can deadlock here by calling cancel_delayed_work_sync() because that might be already running and gotten interrupted by the NAPI soft-IRQ. Even just calling something that can sleep is wrong in this context though. Luckily, it doesn't even really matter since the things we need to do are idempotent, so just drop the _sync(). Fixes: e5d153ec54f0 ("iwlwifi: mvm: fix CSA AP side") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index e1d02c260e69..01432274a6da 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -2512,7 +2512,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, RCU_INIT_POINTER(mvm->csa_tx_blocked_vif, NULL); /* Unblock BCAST / MCAST station */ iwl_mvm_modify_all_sta_disable_tx(mvm, mvmvif, false); - cancel_delayed_work_sync(&mvm->cs_tx_unblock_dwork); + cancel_delayed_work(&mvm->cs_tx_unblock_dwork); } } -- 2.38.1