From nobody Fri Oct 3 07:40:41 2025 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 28CDA2F9C23; Thu, 4 Sep 2025 10:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756980682; cv=none; b=SAHUCS4Z5Z/Q/Pl/y4Q0lCSg8WVRbnUu966pqeewuWULxuJRmPpChTrGnrRUd+Ai1YGQO9GYA75sls0F1lmxL/l8t7T7aFxDErAWyb2vM1J5zVCgLHA+9kyDGltjBBP5yZg4BOlzL+YT1I6+OpfwG5QWOgkp+9YbzJMlMZ1A4Bw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756980682; c=relaxed/simple; bh=x/VbIzHXjgN1UGp6Xssf5Oy5As901Oj3zS6OgovVBz4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sIjUsKOcshADCTAsfIO7VkIQiI8NcCVntKtwDPQvfSamqj0svETEb8OzLH+X1n/3a+eF9MIE0icDfsexX0z5uCkul1j3/8Nhv4yfvwCCcN2E90M2wzOzYyoNzopqJzogkedZZ+7opRTcxUkZYoaXIuGf7kLZ8s5dF6kanYa0S3k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Jf2FbUap; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Jf2FbUap" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 0761FC8EC7D; Thu, 4 Sep 2025 10:11:04 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3014B606BB; Thu, 4 Sep 2025 10:11:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8D2A41C228814; Thu, 4 Sep 2025 12:11:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1756980678; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=5w5g9wRyUW2u4izR+lIr7U3xnHKg5+eWc8QEQF5q/Xw=; b=Jf2FbUapFpCLkwo/VT3oLafliO80dLaD7TbKXu0Bs8aByavMVtlvYNBQaXZZTArNuXFNbr IpcMHRyFX6TZP+zmnesqCfOw2i2Gypow6TsSiCet/Z9gKvZxcxkjGHroEZ+lw9THV53DFo fr9rmnfkag7Bncj4UCcVb1gVBuy1Iu+SUUFJbnZuolFYRLhi7QwMH3ax1poLapgLAMCVyW m3FRzC3U3oX6EfN5NVBOHS2QHs0ENLIfwc5BQLCuomOmJ7X8Bek80dtMr6p/xs+ePu1SpK XJE/kCzgJaoicFSVSh32rwfhiZEL7+CddiD6u/olwXJQ7Sbd6vqsZWCM6pusMA== From: "Bastien Curutchet (eBPF Foundation)" Date: Thu, 04 Sep 2025 12:10:17 +0200 Subject: [PATCH bpf-next v3 02/14] selftests/bpf: test_xsk: Initialize bitmap before use Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250904-xsk-v3-2-ce382e331485@bootlin.com> References: <20250904-xsk-v3-0-ce382e331485@bootlin.com> In-Reply-To: <20250904-xsk-v3-0-ce382e331485@bootlin.com> To: =?utf-8?q?Bj=C3=B6rn_T=C3=B6pel?= , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer Cc: Thomas Petazzoni , Alexis Lothore , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Bastien Curutchet (eBPF Foundation)" X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 bitmap is used before being initialized. Initialize it to zero before using it. Signed-off-by: Bastien Curutchet (eBPF Foundation) --- tools/testing/selftests/bpf/test_xsk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/bpf/test_xsk.c b/tools/testing/selftes= ts/bpf/test_xsk.c index 9bcf7b5adbb35bc4f8f74bc24164291c3848d690..37752b2dad651b36d155051931d= 7b3b902fac403 100644 --- a/tools/testing/selftests/bpf/test_xsk.c +++ b/tools/testing/selftests/bpf/test_xsk.c @@ -1079,6 +1079,8 @@ static int receive_pkts(struct test_spec *test) u32 sock_num =3D 0; int res, ret; =20 + bitmap_zero(bitmap, test->nb_sockets); + ret =3D gettimeofday(&tv_now, NULL); if (ret) exit_with_error(errno); @@ -1269,6 +1271,8 @@ static int send_pkts(struct test_spec *test, struct i= fobject *ifobject) DECLARE_BITMAP(bitmap, test->nb_sockets); u32 i, ret; =20 + bitmap_zero(bitmap, test->nb_sockets); + while (!(all_packets_sent(test, bitmap))) { for (i =3D 0; i < test->nb_sockets; i++) { struct pkt_stream *pkt_stream; --=20 2.50.1