Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3824421pxp; Wed, 23 Mar 2022 06:32:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/XUVGEMI9xFdB+I6jnl7Gt2E1k5nqmYk3XMlvBcQj8Qkq3w/kW5buUI7PigMLuS9qminb X-Received: by 2002:a05:6e02:1ca5:b0:2c6:68c8:e44e with SMTP id x5-20020a056e021ca500b002c668c8e44emr12951ill.79.1648042353833; Wed, 23 Mar 2022 06:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648042353; cv=none; d=google.com; s=arc-20160816; b=KUd9mAlBuyTKYj1IdDBUSylz6QpcTNIO8gdCChIVpYDMHXkVM/2O8IlnTRuReOwMfZ OD9rgWMwdGEKm+vlGaoLySUdpbGttFU+elQWvPmXru+w33m/O+/0PIBd4XT75nFK96t2 s5LzX0vD2xfdSkY6foxSo4n129Lrz+2fRzFbC/yfat6oPB/DHgpLZxnIkR0gtPVqQO8L ONwZkwcranqfsFOj3HQXmuXASSUu9PbLSe72Qg9wIKz132QEdrE2sS3TptUjr0gV1OXp apud103w/rWu25k0rFUk19/aMqoenPD5A0oOJYC2iDCrKAfRjmiLnz5+6UgaoaymIzHL CDJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=VkTa7dan1esOskRom/FVD3mRGaX9rFNekqyu8WhtM44=; b=TFLgxJn3jmDOjRouanQrxCqdAE0/RFhdO5mG/4UtFBYb2LEOY6VqIpP/Y3TSpxiTTd mncEShBh1QXlPfG/gCtXVpwzeyJ9dqe/kFDvKO5sq2KVnetGOkkME6oaP3S8mzHz0ZFD Nob5UK/oDQEFBsE/uTnwOwaFcQzK3FHlgFLj1El/2ZxgCgKszY5Q42pBhLRrTgQ7jsDr sjuUUxzdY0/fkCcA+lYtraZKlkuiGnsupcSBQ/svwRf7geld3WPkIFPo/drnp3mhWRmc szC1bqAIx8B+JaBCqJwjZNOrJksmCECj2YzEAPfKONRBfsWRlR4xEL2Rtue4u+YKpC7g XUFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p8oZgQds; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a0566380d1600b0031a2a42165csi11683286jaj.126.2022.03.23.06.32.16; Wed, 23 Mar 2022 06:32:32 -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=@kernel.org header.s=k20201202 header.b=p8oZgQds; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238363AbiCWIyE (ORCPT + 70 others); Wed, 23 Mar 2022 04:54:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240497AbiCWIyD (ORCPT ); Wed, 23 Mar 2022 04:54:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89AAB74602 for ; Wed, 23 Mar 2022 01:52:34 -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 ams.source.kernel.org (Postfix) with ESMTPS id 1DB24B81E3A for ; Wed, 23 Mar 2022 08:52:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C1E6C340E8; Wed, 23 Mar 2022 08:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648025551; bh=YjWHIZTg6PjTiotVPBCLS3wghluBjBFTrsWS2433muE=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=p8oZgQdsBzrWpgckjFumesIw/6mqqBhkQRbMXsFLnDgnelVf3S/j9pt4JezdaZ7VG 40T5MWW1KZkHc5mqDVzFivZhHsM7JyEqF0dixWcFShTrLDxYi5Ky4EMyOYzovMH5x1 DJqIwMvmJJGtvthSHLuOhiptUgyq3Dj5yJMMv75pOUuz4NXKSlqjDC8IFXD2xbgX8h W5o7lukjHXkhorhutfINUq+6I+1RqL1K+rdfq4Ltc2MYlmFfNiPuhiGCPXRTmNlEiz jU9OKjewn5+kIDLTPFjw4l9h8yM8ysoK4htMGLAN3ei/EHCIzSSSgtCZC2yKTpG2lp 2IayRTMG7RzWQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] ath11k: acquire ab->base_lock in unassign when finding the peer by addr From: Kalle Valo In-Reply-To: <20220314215253.92658-1-dossche.niels@gmail.com> References: <20220314215253.92658-1-dossche.niels@gmail.com> To: Niels Dossche Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Carl Huang , Niels Dossche User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <164802554371.545.14175354051813428443.kvalo@kernel.org> Date: Wed, 23 Mar 2022 08:52:30 +0000 (UTC) X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 Niels Dossche wrote: > 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. > > I am currently working on a static analyser to detect missing locks and > this was a reported case. I manually verified the report by looking at > the code, but I do not have real hardware so this is compile tested > only. > > Fixes: 701e48a43e15 ("ath11k: add packet log support for QCA6390") > Signed-off-by: Niels Dossche > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 2db80f93869d ath11k: acquire ab->base_lock in unassign when finding the peer by addr -- https://patchwork.kernel.org/project/linux-wireless/patch/20220314215253.92658-1-dossche.niels@gmail.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches