Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2301051rdb; Thu, 21 Sep 2023 14:41:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGW3UlKffd3LAWqvJrLLMrtwUR+vMAO70Fvf8nat9hEpPFhAuf7kZ5MPIH/OAQH2ZlYVwtN X-Received: by 2002:a05:6870:a9aa:b0:1c0:1caf:3324 with SMTP id ep42-20020a056870a9aa00b001c01caf3324mr7865950oab.44.1695332498719; Thu, 21 Sep 2023 14:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695332498; cv=none; d=google.com; s=arc-20160816; b=Yc4rg0qXAfCBPgHTRatOOR6zKRgPEG7NQ8bUx5iiFvJqNPk8P+rxk4/0nY2h2rKVDj JoclqqTQ+sB8SRxhy6BOPno2pGdrY4qfCfXsGucrQhRRa8LxxWBYyrbHWpXTS6Q3H+sp 4PTLgeVARbZnqdy0W/9CnvtIKeFx+Cp//VRX2RJYzMjDQm4dNtkPfQt+s8PxkZShBOx9 ZkLJxRe9lg8iDx2WTtMNI6hHVDUPAJDr+ExzPTWiC9a+VL/BHarm6D38xlK8aQqQnCck aH1d8Vn/ma2kKzR4RWhSiNDmIAiF+7oa2AttIGpQogbPRt1R6PKR2nlbFJoX/bmxriaV 6pNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=abOzlHyrE9pNGaYVoAoNekhECNEcDtTHf8HtjK4+7V4=; fh=nGNyOw6nGEj65OyNK/qnQzCol/vr27aFKRURZYeTUFE=; b=kqLz6qAL43pSab3XrJe9Dw/q4YWvyA5jKtgaoS4E0c3yvNWMvIEOcEE3Q12hngaGM4 12tLgD69d7jZlir2yKjQxmZAwM2YnmtRzCvcb88eE+hiSZDzZEPcyeYPdvTYWbCPnYwW czWDq83F5LBANYwo7sCPhkmIICY3V53ir5K8Th7ma3lA3L8Q2fSaBi6IXJisvF79Wvet 73UBJyZqHRMdTQQ+v+Cqm9Y9MJP80YZPeyS4EwONJwubAsHXz96Zx9lxQZ0KICXSIBfc MHxxO0MjHsK8F0JB7Ocp/uqEz1NMEHI/Wphv7kQDSqWJsWYWRyjU69AEhm0TzjLgfQ5+ 1aUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TOMt4qeJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id q29-20020a638c5d000000b005775302b11csi2355581pgn.81.2023.09.21.14.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 14:41:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TOMt4qeJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5488080972BD; Thu, 21 Sep 2023 13:10:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229723AbjIUULB (ORCPT + 56 others); Thu, 21 Sep 2023 16:11:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbjIUUKk (ORCPT ); Thu, 21 Sep 2023 16:10:40 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C94186A0 for ; Thu, 21 Sep 2023 12:54:29 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38LJ1203015172; Thu, 21 Sep 2023 19:54:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=abOzlHyrE9pNGaYVoAoNekhECNEcDtTHf8HtjK4+7V4=; b=TOMt4qeJs5qZtzoxsE2NyHiGf9hHmYHFhOa9TKwtxDPduIDQEHorIVDuoFXowRTW5l2o IbUfXOUfQusxzb1HGaixQKXdM+dNFFs2jsQCEGbeTggYmi58Nih3aiK3ty3PwkPRvIVr VhYZvZg1bq9HvHtQSVajOcan7mpph5fw3caD+UmPR87wO7P4KwuLtk5eljdWwF46YCrc rRZTE0V8l4djknrLZXUjQcl9cVes0QxCPerv5NL6z4W366KkCjY096B6wKnmxzxN9tWD +JbChiYbODPtfT+eAk0bbWO4W6kPenKcAWZJp2g+6uZFapt1pApirwaSUeLYYCZYD2Xt ww== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t8um1r359-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Sep 2023 19:54:17 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38LJs3bN001494 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Sep 2023 19:54:03 GMT Received: from [10.48.245.144] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Thu, 21 Sep 2023 12:54:03 -0700 Message-ID: Date: Thu, 21 Sep 2023 12:54:02 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 03/13] wifi: ath11k: fix a possible dead lock caused by ab->base_lock Content-Language: en-US To: Wen Gong , CC: , , Baochen Qiang References: <20230920082349.29111-1-quic_wgong@quicinc.com> <20230920082349.29111-4-quic_wgong@quicinc.com> From: Jeff Johnson In-Reply-To: <20230920082349.29111-4-quic_wgong@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: jSYuN3RPtFiUBI5XhgedGZJtHWKeA97z X-Proofpoint-GUID: jSYuN3RPtFiUBI5XhgedGZJtHWKeA97z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-21_17,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 mlxlogscore=768 spamscore=0 priorityscore=1501 bulkscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309210171 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 21 Sep 2023 13:10:57 -0700 (PDT) On 9/20/2023 1:23 AM, Wen Gong wrote: > From: Baochen Qiang > > spin_lock/spin_unlock are used in ath11k_reg_chan_list_event to > acquire/release ab->base_lock, for now this is safe because that Kalle, can you s/, for/. For/ when you pull into pending? > function is only called in soft IRQ context. > > But ath11k_reg_chan_list_event() will be called from process > context in an upcoming patch, and this can result in a deadlock if > ab->base_lock is acquired in process context and then soft IRQ occurs > on the same CPU and tries to acquire that lock. > > Fix it by using spin_lock_bh and spin_unlock_bh instead. > > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 > > Fixes: 69a0fcf8a9f2 ("ath11k: Avoid reg rules update during firmware recovery") > Signed-off-by: Baochen Qiang > Signed-off-by: Wen Gong Acked-by: Jeff Johnson