Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4025163rwr; Mon, 8 May 2023 01:28:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4C5e+fgCLuBZyCsnw48/BiayKfOOekvhlm5vAx6OXEQuHUZCf2vN+0vMr5t+aZKUHfcOv3 X-Received: by 2002:a17:902:e846:b0:1ac:85e9:3cab with SMTP id t6-20020a170902e84600b001ac85e93cabmr721049plg.56.1683534528349; Mon, 08 May 2023 01:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683534528; cv=none; d=google.com; s=arc-20160816; b=ZQYDH/3knIqmbshKy2zES6+cfha0TSxVkO3xajuLjsnX1Vi62wE1Q+HhGWcHTNxwwS egat1ukTpGhz45uc8KW0IJqONCwoRo9fp32PrTr2a0WXtQG38qKSkOJ6/53mkC89Whh/ wkamVG+BtIkhOl0YW0tfQmKLBVu3pa7IS/QhivVlpEHcVcNxQJ+NL7PY9pwv+g6JW8e3 sKe5qGqrv9fpqciNH1o1o/K/zShFYQyGPb8EJVqgVPsgaMDQ11hCN5p5tjww8Mjtvwc3 wuQRqjM00aRfKv9U8UJTQkxT4KsDmcCPptKTyAGWD3CpZhlu4D43dxcUbzefNUlYt5O6 oGfg== 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=HwI4Ff5nlkiAz6S2Xp6GoNE9gpdQo4VDQpkK5mE1gXsL/tJD1ti3C0n2/gbIZSqEmX Q3Bzp2TtDm5EPb2WfbCzvlUUDRXbushBcVjKqREexhlU/cU2Q1BEgEFdpjwbNcAA9Chl e0jtDOXqYXfRuliaH8W4Se2rSmBfE/jP8Cw0W/a1mU4kzVPwJXEIh+HZn6cMw7NS5UL5 7KphcIic0WZdoPB5LfKxL6TqVYZ5GV1M/mvzMAjXj2nrDHiEPQJMtbZwDmNr5u+fVyl8 FLs55vTBFYIuVhIFYu5OXicu/J1BP1IM/a21Coz2HNa9Ytuj9QLnsl+8tpmeQtxuVjTC /M9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aRnK0OXg; 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 a4-20020a170902b58400b001ac706a7b85si2563744pls.90.2023.05.08.01.28.41; Mon, 08 May 2023 01:28:48 -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=aRnK0OXg; 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 S233490AbjEHIZc (ORCPT + 61 others); Mon, 8 May 2023 04:25:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233551AbjEHIZD (ORCPT ); Mon, 8 May 2023 04:25:03 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCA0121544 for ; Mon, 8 May 2023 01:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683534299; x=1715070299; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Mjj+kJ6d5lwyILzh4rqwz+7vUHyuSIBqSmc0gWSmtlQ=; b=aRnK0OXgx/YfPECKuLH/E1lQRAqBO5/BJQIcLAfKLpJ1leRuiO6rgwKf XgL6lFeI9wXUquR9UOxT8uR3WaDsbH+fYebhNGJwgO2cpBGyiYU/bIkIv nq8yYnibpzgaI4frDj8RpDM/QPA6GmvWK9VOUzwhuN3P1IdtTs/3YldT9 k2vW2v8WF2t7y2YcyixlAgKOhK/X+W5XvjnIyW2P7ghvMyRShOKaUFCV2 d66sHaVPUvwAeW7yLAKaTPBay2ao6FYoL8qfDARwZp6pXaR7i9Xfp92oQ kGVPOenCt3D09hzR2vbWLELx3Yk/VP5vswX/PFOMKDzCi1fUCbBak6gKK g==; X-IronPort-AV: E=McAfee;i="6600,9927,10703"; a="329949884" X-IronPort-AV: E=Sophos;i="5.99,258,1677571200"; d="scan'208";a="329949884" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2023 01:24:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10703"; a="767982636" X-IronPort-AV: E=Sophos;i="5.99,258,1677571200"; d="scan'208";a="767982636" Received: from shemert-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.224.248]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2023 01:24:57 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 07/14] wifi: iwlwifi: mvm: fix cancel_delayed_work_sync() deadlock Date: Mon, 8 May 2023 11:24:26 +0300 Message-Id: <20230508082433.1349733-8-gregory.greenman@intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230508082433.1349733-1-gregory.greenman@intel.com> References: <20230508082433.1349733-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, 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