From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBAE0C433F5 for ; Wed, 23 Mar 2022 08:52:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238363AbiCWIyE (ORCPT ); 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) 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