Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1103201pxb; Wed, 6 Apr 2022 08:48:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE119qvxPOKiQ1Ss3rb++TwP1EFhJYFM8245y2rwljgXay6FIlFBMKFZsHaHDhsfDFSFV9 X-Received: by 2002:a63:3841:0:b0:399:26da:29af with SMTP id h1-20020a633841000000b0039926da29afmr7465321pgn.489.1649260087214; Wed, 06 Apr 2022 08:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649260087; cv=none; d=google.com; s=arc-20160816; b=V5uXzAB9Vh3fzEw+SlXdE1mNStFWn38gHz8xSAWLWgwbahta8KiwFoPwq2scedY7Sf hHi1NjgZBUx5NlQpbSvMq/HDiUpW0xsHVpFfOxMziYybTJmT74AnZNEy2NUgcBusxEws 7bVtzM2jrEg5813xQ+Olg3qvJerQO3dq55gOqfHixpTgEevytcyYfKzZyd6uGW6GpB2n 5ikhdGNlNqH+WfeGQWWB1LkRoYsnE47hF6l8PGEsepSvKWX2Ut+vXt9+j1/CXdAxukMf Q5YdqH87ZFXu8UJAtzDdSpb930i/2iCtvtDl/byqQeztxiVgLuAXlYY/QyvbNSnSxQwW QQWA== 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=wSdd/Kw/UW1i5BOD3RP9U/QL5lr0Lfm4IEeZbhMVIFg=; b=T6/LkgaQx6gd6KHdvtj8FRgS4TekM/hpQaYx37oXXungSh1hLvnlvCPhogQEXagcos HRt5tRIK/xA4Hh4Eevx+TXfdFmJlKYXUjV9mGuiwt2QnIa/twrAdcaL3DdBpOm/Sc2Mg 70bZBI3nf2E3UqdHK4q4EuwPGrrBqRCNDhDSQ79/B/K/oKSbUU/2TzWnWZBhrkpjKlLV gYTHoAd8r5OW/R4/e9hMUCWcji7qtFooQz+X2tHk7koYNrPqdq102i7X9iaUpWSD+8By FlkDFHQwEJKent2e+A46hax/ZywNBazQG6VIGZ0R5l5LEuYmGO02raK2ZwIVw8UHuhj/ 7r9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BJeP7lZK; 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 k9-20020a056a00168900b004fa3a8e00a8si18176520pfc.351.2022.04.06.08.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:48:07 -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=BJeP7lZK; 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 70619184268; Wed, 6 Apr 2022 08:01:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235066AbiDFPCP (ORCPT + 69 others); Wed, 6 Apr 2022 11:02:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235617AbiDFPBx (ORCPT ); Wed, 6 Apr 2022 11:01:53 -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 74638BF310 for ; Wed, 6 Apr 2022 04:46:17 -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 28BB3B8225A for ; Wed, 6 Apr 2022 11:44:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19BC5C385A1; Wed, 6 Apr 2022 11:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649245461; bh=t/1WjGp8WNjjlMiYJRrZjH4WA3tZKE972/DK9Bh8DqA=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=BJeP7lZKM5aNKjMovQMqRUCVj23YfuXDU4sQn/IP2L2EbIZ5h4kRZv7GuHToW3kSP jZbzvkfMcgRkj+6dPamHm2ooUBa18M3loiS2v0LKhIP1xeDS1Ie3UOY4nPG4OC6rN1 9l9quJbMtJtXbcjxO4M2l1kzN9BJYcce+YYWlum3s+QD/JIENMpUk+saW/cg72pCc0 WbGWG21mJjBbugTKNNLCDci+sITNovEx+9IeRfJMizUiEuL6Tc5/iYdlrFL990GdO1 v7pEEZUHapHvE5B811qZ6OUY9x/kqal3WKv2vLXyVHFDsIJbmiRDmyhExqfD3LMXoX qcWfJvYRWWU6A== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v2] mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue From: Kalle Valo In-Reply-To: <20220321225515.32113-1-dossche.niels@gmail.com> References: <20220321225515.32113-1-dossche.niels@gmail.com> To: Niels Dossche Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar , Ganapathi Bhat , Sharvari Harisangam , Xinming Hu , Brian Norris , Niels Dossche User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <164924545655.19026.5921699639764275443.kvalo@kernel.org> Date: Wed, 6 Apr 2022 11:44:19 +0000 (UTC) X-Spam-Status: No, score=-2.3 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 wrote: > cfg80211_ch_switch_notify uses ASSERT_WDEV_LOCK to assert that > net_device->ieee80211_ptr->mtx (which is the same as priv->wdev.mtx) > is held during the function's execution. > mwifiex_dfs_chan_sw_work_queue is one of its callers, which does not > hold that lock, therefore violating the assertion. > Add a lock around the call. > > Disclaimer: > 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. > > Reviewed-by: Brian Norris > Signed-off-by: Niels Dossche Patch applied to wireless-next.git, thanks. 3e12968f6d12 mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue -- https://patchwork.kernel.org/project/linux-wireless/patch/20220321225515.32113-1-dossche.niels@gmail.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches