Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp947114pxp; Wed, 16 Mar 2022 22:16:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJkER2WJPhbCm83slNDjW8q5r37dqRCUbRXUE2fzDVjZaVrZ97TjxPFd5nxVMCkuUn+2BD X-Received: by 2002:a17:90a:6404:b0:1c6:5a36:6138 with SMTP id g4-20020a17090a640400b001c65a366138mr3333499pjj.61.1647494164855; Wed, 16 Mar 2022 22:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647494164; cv=none; d=google.com; s=arc-20160816; b=ozob7nJ2IkM/HXOJpLxOOBGK60fwH37q0YO44KwTTkHcEicP5mLo8LFKjKDxJcMH5s MfMZIFhrIzRhD4lmJEYB7tbJCEQo2o2nm4h2/xgHhDxJO7h4tu6gs/BHtZz2TjpRboI/ OzYYzWADiBPei4JdF8CRlLQx+yDXjN7Emowx+fXw7TbNYWHqWiJrl8tkhBflnFRzdKl0 HSD9M1Mhi/YVMcU62b9VI9ItCl5fVicjL7UZNhc4Q2O64lSRyxbCi7J1qoks2Ptq2XLh NPxnIXzNvxejFDLEWGsHXdV4wMBa+EfC3abcep8YS38nHWlKuq4L9WaI9I6L1MlGzq/i 5PBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=yAvsZ0J3lxFJ3eDuF1uyAXnUuBwPQahWuJOhfm2oS8E=; b=k9vsj4E10B31z1RdwKMVqOs4IEAMztolOfVIlzqQ1DhvsQ5OEcEiF18Cb5SBaQkyBd u9HC0QVJMCs/Lw5VeNENfSZ/qoslhdBCpVoLgy1pS3E+k1FsxNjOXiyJmh0uBoNfRXTp 97blyr+Zx5Bd4xFPTugcDa9hCNuY0xO/Vc2hd4yor5WElV7o7ZbqN/KOWwcjCpv9F5hz g+loKEohdf6sEtfx/LN7Arl458bZtS5FkAVgpETRdWMZiU/eK4LLiwr5YfbfFE+70m0V 83sX1cXg31L/sOQq/QlQOhLqd+htwo2em/zWym/zNm1kViWJb/0UfdqvLKoUtFhFZNLS DlTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YEM9vFhK; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bd6-20020a170902830600b00150029180f6si3357474plb.356.2022.03.16.22.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:16:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YEM9vFhK; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 099721EFE31; Wed, 16 Mar 2022 21:24:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236129AbiCPOfm (ORCPT + 70 others); Wed, 16 Mar 2022 10:35:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233516AbiCPOfj (ORCPT ); Wed, 16 Mar 2022 10:35:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB72535874 for ; Wed, 16 Mar 2022 07:34:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6646961560 for ; Wed, 16 Mar 2022 14:34:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EB08C340EC; Wed, 16 Mar 2022 14:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647441264; bh=C6Lt9584D2BMdQ1sVehnMgWojMQ5SjZCZ4NdyebLiF4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YEM9vFhKhtXshQrnM7ZeKg9DxMJc9lMJoAro7+8VXwTxKh1CsqXLzygtmnvQjHVg2 7E6akZwNFhl16IHbfJYKg0sEvdnd6hKIVLHKHYPPbUaW43FGFwlVVitr9Nc++AAX0A +89sj+BIzLV33KqUT4O38CnBKnicQKfEgasHxnBYInRq+kjXvna++VO0bgMX2fnDqo xnDl+RoVONXz6RFWCH+BgP79mahYfZrB2YtI4592cVxy63AJgbnnZ0c1vLq9M+sZ+B vd7RtYozOBL9seevfR3nHxWzPAtxtTlUZrKUb8AX7AzR51FY6OHa/QHhUcgT6KEeoU xi0jTcv2rzLtQ== From: Kalle Valo To: Niels Dossche Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Carl Huang Subject: Re: [PATCH] ath11k: acquire ab->base_lock in unassign when finding the peer by addr References: <20220314215253.92658-1-dossche.niels@gmail.com> <87o826pgqr.fsf@kernel.org> Date: Wed, 16 Mar 2022 16:34:19 +0200 In-Reply-To: (Niels Dossche's message of "Wed, 16 Mar 2022 11:43:30 +0100") Message-ID: <87k0cuotjo.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Niels Dossche writes: > On 3/16/22 07:13, Kalle Valo wrote: >> Niels Dossche writes: >> >>> ath11k_peer_find_by_addr states via lockdep that ab->base_lock must be >>> held when calling that function in order to protect the list. All >>> callers except ath11k_mac_op_unassign_vif_chanctx have that lock >>> acquired when calling ath11k_peer_find_by_addr. That lock is also not >>> transitively held by a path towards ath11k_mac_op_unassign_vif_chanctx. >>> The solution is to acquire the lock when calling >>> ath11k_peer_find_by_addr inside ath11k_mac_op_unassign_vif_chanctx. >>> >>> Fixes: 701e48a43e15 ("ath11k: add packet log support for QCA6390") >>> Signed-off-by: Niels Dossche >> >> On what hardware and firmware version did you test this? >> > > Thanks for your reply. > I am currently working on a static analyser to detect missing locks. > This was a reported case. I manually verified the report by looking > at the code, so that I do not send wrong information or patches. > After concluding that this seems to be a true positive, I created this patch. > However, as I do not in fact have this particular hardware, I was unable to test it. Ah, I didn't realise this. If you are using a tool to find errors in the code it's always a good idea to document that in the commit log. I'll add an edited version of what wrote you above in the commit log, ok? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches