Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1164352lqb; Thu, 18 Apr 2024 01:53:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTrlN2LRWWBn13xYG/WcdxyUh1h8JRiKQQ1qnfNFMsciOfy2OwiwrsrlzvG92224KqXk5vTOjhIZs/nRiQAqY6//zWst/2T01meFNL/g== X-Google-Smtp-Source: AGHT+IHSFKngaeBXpFEFJ2GwFxrGKkpBSVvIf4YSuAIhxrstv++xkfQXuBpJnpz0FjpgowkfvsEg X-Received: by 2002:a05:6512:3d01:b0:515:9abe:6c46 with SMTP id d1-20020a0565123d0100b005159abe6c46mr1513668lfv.34.1713430394078; Thu, 18 Apr 2024 01:53:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713430394; cv=pass; d=google.com; s=arc-20160816; b=sBFJOCpFtCJYYKJz0oU0xljVIhZh9Kbo3Nxz4xLgZTO1WfnIrqe4B9dXL2jIg+1R0Y Kyrbd+0KDL76J/Hv4DW6XfKNjsRUWdrlYop2NETvAwzlAz/6GMku5EI6WBSfPvwOuKVx soYWIrSb6zX617Tx8PIjTgY6AgjOQTJ64jTgmmnytyH7+pppW6KcCKXTwlcif6mlr6Bx NhC4JvcIO2PcANr8wiG/wn6nTot1yFmSvOkkBtBpuAaLBhQt3Oe85fFAHaMOyw6L13vJ ckOiii3ppMG5bRxUnGab21CY6C5ySGwh1zP9bIR6QZ0iDVk2MJKSjcp363il2X29dzqb I7bA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=D/u2jsp8cLgU+425jsad0NTt3fx7STSVK2rsPR3RWgg=; fh=0ZKV22Mpi0Z+/zRlCC9GRUAKl0wLMxmYgR1nXO1NAEs=; b=hWU3ci3aj++udgP4chHbXFTuhRbVxnZUfOMABHz/VbZ7e2h0ng0p065OOgGN3enjjp VcFZ/4iiO7t+sEEQxD/CnSCXGW11oBj9gyeErxkWD6iUazVL+FQj+yseobQBDC+nbrUk AOId9a8mkuyyw19AVeZjGQjQDbLj/D+q4fZ6EMH11lhVM5f4v9UcChinDVeCkfi4PF3v 8300N/H0AgU5q96FYtJU8Cxr6NTRa43cBh06JffuDfXzyPuqiKWKp1r4P5H71UPejzEj MnhFqWCcINhqu8zBGpWL9i8wkwE2WylsOmy+gGZvUIff6x64dSmjxHEojj6IF7iR9A4S M+fQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=s8rm0Rce; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-6511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x12-20020aa7d6cc000000b0056e3bef00fesi591182edr.623.2024.04.18.01.53.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 01:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=s8rm0Rce; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-6511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C1C0D1F216B5 for ; Thu, 18 Apr 2024 08:53:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DB8015AADA; Thu, 18 Apr 2024 08:52:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="s8rm0Rce" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 597C615AACA for ; Thu, 18 Apr 2024 08:52:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713430358; cv=none; b=i3d8KlBJXGuEWDLHKkPpS+FwTAvTNSurceV75PMv3XsXsP7PYOAFOiSpBV3lF5RwBls6Z4S2XUnLlbiwgcxZLJX1ttb+AETkXal4lE11lhBCOsvctzW5sNsU74VyBpgCok2l/wCBXPR9QAIx/cyc8BI+eUXa/hUhCcfvvLnM5JQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713430358; c=relaxed/simple; bh=vAWkDa5jUKiMHqZBlTNC345dG2WBtzYy1qkZ4fVFJNo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=giSfr/zBCmI6jKzHsd5hbBycoQ7ecSV09p24J8lG53K9o+8rIBhxH0acJfV+pBJ0F9soN1xI+sInHxBzw5rHkHGJRr2Nz/mc6NAqFlpFeiXoCqeetf0BRC2XKi9hD7haRSZjLnO15K1nEEpkOxtrGpctlzK5Y36GA4lmKhbOQz8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=s8rm0Rce; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net 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=D/u2jsp8cLgU+425jsad0NTt3fx7STSVK2rsPR3RWgg=; t=1713430355; x=1714639955; b=s8rm0Rce3ZsdTaCdVvcKCEFmm7DZPSyeD6R800jKDlVCqBn J0syopx67ngLhrBYeRv9m9GSHxcMtchksgD6DZDO3EiiPC9Dc79Su4yrZyE+dvujr9pKFE32+Jo8I AoZQ+x+JVMV/7+Zbwa7TDteTKJraSkb3ImkO2GZkLMV47+idP9GMztLzxLsUo/Q8UnpORB7gF6ZEy PLyIFsnCJgHBhWjB9XMoXgd/KjUrS8FUnaQvem5R6bung/Y4nE6Q1qFhC56SVT9EoRdkVwYOMh154 DB4fTubOQUkAAKqJRLNCeybFWZHvaV/YJIFAxKCgQw6YKJbzPMhzsUI4vHUmOvjQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rxNVL-0000000CIvO-2i90; Thu, 18 Apr 2024 10:52:27 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Miriam Rachel Korenblit Subject: [PATCH wireless 6/8] wifi: mac80211_hwsim: init peer measurement result Date: Thu, 18 Apr 2024 10:52:24 +0200 Message-ID: <20240418105220.e1317621c1f9.If7dd447de24d7493d133284db5e9e482e4e299f8@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240418105220.90df97557702.I05d2228ce85c203b9f2d6da8538cc16dce46752a@changeid> References: <20240418105220.90df97557702.I05d2228ce85c203b9f2d6da8538cc16dce46752a@changeid> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg If we don't get all the values here, we might pass them to cfg80211 uninitialized. Fix that, even if the input might then not make much sense. Fixes: 2af3b2a631b1 ("mac80211_hwsim: add PMSR report support via virtio") Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg --- drivers/net/wireless/virtual/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index b55fe320633c..59e1fc0018df 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -3899,7 +3899,7 @@ static int hwsim_pmsr_report_nl(struct sk_buff *msg, struct genl_info *info) } nla_for_each_nested(peer, peers, rem) { - struct cfg80211_pmsr_result result; + struct cfg80211_pmsr_result result = {}; err = mac80211_hwsim_parse_pmsr_result(peer, &result, info); if (err) -- 2.44.0