Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3091206rwb; Mon, 15 Aug 2022 17:54:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR44SvyjUVmj3gB+UyEc2gYSxCBJzJ383Xvhhc4dbBFkHjnmB3YcdfGx8SVrwDYMZVJ0c1NE X-Received: by 2002:a17:907:1c8a:b0:6e9:2a0d:d7b7 with SMTP id nb10-20020a1709071c8a00b006e92a0dd7b7mr11376253ejc.572.1660611290605; Mon, 15 Aug 2022 17:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611290; cv=none; d=google.com; s=arc-20160816; b=Pv9JjUGlWgh6CKh/Wf4CMyHXSll3jF6fsE2lN9AnhTPt8tu6EbI04Q3pL/JnpvxkJW X1AQu0Htg6G+X31EPVDFX3GR1FlriRo/GOZrLm+UqW/l7vJMFp59K0APWQAfZAcZ1UWp o94a7htm9Q/lFfYpGwbbZCjqGa0k2dH46fvQo7p4FtfHDWxmdXxXFOVouYkaIZebw8gV gtd1WERe+hYqgn0hVVGdRr3jJbZOkNbxEkcDXnALCV19EoFwNTEBWsu6l+Jx/V4Of36h Np65o/AKkX1YgXn1lu/2ojDPbiVD0QFUc6mmdiAHk6YiS8lEE6IwxU7UDUdKA2Lig5u5 TWaQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3WPJx3PdeDij5IrPKAEbL0zkxFSh9Deoo47kBeKurqE=; b=0zuQbSvhH8FAOIHveMStNRsiggQ5CU9Wmaih0eWDgwa/0LUatWKt+Vb3HlzAY/Fy+X GC7ztRaZyo6jArt3nsyY6+9jnOlCiFd1oMEiq5tkwNeJHCh6znCkgXyNkoFHpLSEdAYI TdcGz6hcPOOZ1gPXVOY/oxLjJC9rh2VAvtVcY0KpXPmHfcJg/KCGSHFvnOsYyqJSbr6U ZEMW+JLhjb2tA0RstxbcuuSkUeZK9y8Erplty2od4QTo2YFjhRHwqQ9PsUVb8togNxH2 vvC5O3QxRAMiiNaZq5+NMjNM4TmWt+c9D7tN5RXmVcCWlcWNKVItzk5qT3NH18uLA44n olmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dydQNzT5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wz14-20020a170906fe4e00b007385dfb42c7si3083886ejb.565.2022.08.15.17.54.25; Mon, 15 Aug 2022 17:54:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=dydQNzT5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355625AbiHOX5S (ORCPT + 99 others); Mon, 15 Aug 2022 19:57:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355369AbiHOXwA (ORCPT ); Mon, 15 Aug 2022 19:52:00 -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 2BD8592F4C; Mon, 15 Aug 2022 13:16:42 -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 DAA24B81135; Mon, 15 Aug 2022 20:16:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22EA3C433C1; Mon, 15 Aug 2022 20:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594599; bh=/HDOzt1fxq18AH8twZPBlkZvpI2voQRH1kRapURW0Q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dydQNzT5HsIbr4/SCl27P5CKJAq6pjT/b7ti+RxD205uEcFu6QkJhg8xck2v2VTMP o8i6D0tTnbEYWXCoM5G0+1V+c5K4Kg3h6+dN5Rp9CVHVottg0yXcGmGqGBSSpMswxj MfTW5zJ8kSPEDnwx1xhUH2FS5HrB2pe/1/I5lVdg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Sasha Levin Subject: [PATCH 5.19 0499/1157] wifi: nl80211: acquire wdev mutex for dump_survey Date: Mon, 15 Aug 2022 19:57:35 +0200 Message-Id: <20220815180459.646326974@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit 284b38b6902a7154e3675482418a7b6df47808fe ] 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 Signed-off-by: Sasha Levin --- net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index af31978fc9cc..c4014ee3f667 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10126,7 +10126,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.35.1