Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp508375imw; Wed, 13 Jul 2022 02:48:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tVP6dhGHbGLpPZOGZl7HdOm91iiksmrqnmweNO/EIwEqdEpfhvrwwKIDVMKi4rJNXFhq36 X-Received: by 2002:a17:90a:1a14:b0:1ef:91a9:3c91 with SMTP id 20-20020a17090a1a1400b001ef91a93c91mr2969149pjk.203.1657705706367; Wed, 13 Jul 2022 02:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705706; cv=none; d=google.com; s=arc-20160816; b=o3LqtVZbRrGpr+sY+G2j6dkvzaWSEOGOraR1+KtcbTu+IPaRxQRk2+542QOLbjay6q qnzTPGNy0Z9vv6rqZxGOrUI1Nt39CdI/6MRqlW3YuWDXTBC8s/haPmp6uRNHt57ITnzC ATober7snhlxPdChiNPnWRbECDKYZl2drU8ha9cVAgVSasmsINztTmmatgQD3QGayWsr mV++XI/UlBscQagJ0gXfzjto2AI602CwcF9AtsdfTiwbcXmupczr5aNOvIkT81+smxh9 YCKoY7bGrGu/FdQRe7SDKVr+/Bv1K8VmHO2E/RMy+4e7FfJFaxhqAnhMJYbYEJydyaeB vTEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bN1O9RYWnDxvqRmINA80nozgfqSNrt4VcbHV3moRdYM=; b=g8F2bEDLWqiyzxHyImzObntxgA4d08kqDTkqvs4FjlIkzZ8rDQNxbQSKwEAOHBngwL Yo2YCoVrMTtWFw9BChljUvAtaoga/FOiamM9zqh2E9882U4S/vn54xpKQAjjedh6cAxG Xpee0pHnrSawxW8i2rmZjVCJW6CfrnAxyRa4Z+qJBFA+Zwkcc00HC09apnAU9En4ZX35 hc5V043UtRjdXw6hjBJLB0j0kgkByS4UXnYrU4vwFZ5SsuuYHMCxvHHepslz1k+vDX7+ ObhLQN7xuE2XGauHeQJxSEObRfL7/0WXCaPA4GDMchMDdubBrCZMsn5BNjJtlS/jfrIb JQug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Co9A5g9H; 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=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o21-20020a17090ad25500b001ef3b7138e2si1776104pjw.56.2022.07.13.02.48.18; Wed, 13 Jul 2022 02:48:26 -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=@sipsolutions.net header.s=mail header.b=Co9A5g9H; 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=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234478AbiGMJpi (ORCPT + 65 others); Wed, 13 Jul 2022 05:45:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235849AbiGMJpN (ORCPT ); Wed, 13 Jul 2022 05:45:13 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03146EEAB6 for ; Wed, 13 Jul 2022 02:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=bN1O9RYWnDxvqRmINA80nozgfqSNrt4VcbHV3moRdYM=; t=1657705513; x=1658915113; b=Co9A5g9HkGlL6vErtaR1s9A/rireGZcPmchCFKhb9euATrA kN6g/ZgFjRg4ji+msfTsLkx1AI7IVnRMxUO+KoVTRcJaDuqx+veWeyKbMtXrXXDlngsWvZLBN6WpR eMPfNZT7l1dnGvVi8rv11Rh/MHgEP24/dMouns8FjQsgYnCZuDGmldvIkC3v1eKY2h/7lxbZBYW2x KNPcIsbCiftwM/Cl6Mgy2cUlMWlzKYSuMuwSmP+1GUOs+DE3jd0SVoz1adNrBCmqgEBJKgTbn04AM PQywJinyYsQbAbu3f2LsM5+43XfvZIO8one224ljU4Ot4hVK0Q6FXzPeqclDSKcw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1oBYvf-00EgvB-Aj; Wed, 13 Jul 2022 11:45:11 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 23/76] wifi: nl80211: acquire wdev mutex for dump_survey Date: Wed, 13 Jul 2022 11:44:09 +0200 Message-Id: <20220713114425.144225d04e6e.I8aec1b25f42c4977ab5f4e4a0286eba551d3e13f@changeid> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220713094502.163926-1-johannes@sipsolutions.net> References: <20220713094502.163926-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 From: Johannes Berg At least the quantenna driver calls wdev_chandef() here which now requires the lock, so acquire it. Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b50ba1803595..886d964242ae 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10233,7 +10233,9 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb) } while (1) { + wdev_lock(wdev); res = rdev_dump_survey(rdev, wdev->netdev, survey_idx, &survey); + wdev_unlock(wdev); if (res == -ENOENT) break; if (res) -- 2.36.1