From nobody Thu Oct 2 02:15:07 2025 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 5B95230AAC2; Wed, 24 Sep 2025 14:50:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758725409; cv=none; b=qXDnb4s9MQZXYq15/X4RNn/ixmQaJyG91MGedZlgCC2HKgVMmh7/KFz6p3kIbbraIfKM67+NE8ADsFXOQ1JbTKBmFzCmjAOkhLJW1JrdA+Nt0OX38tj3ToH9rwYWCCz01kKsoApbeN3cMCZ8bxuh25xbVDqh8BhHMfdHigIcqR4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758725409; c=relaxed/simple; bh=2nZ+xS75+GYRbPbEr1s2AotVB+FzRxeAkPwF05aNpcg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UKMVhgqjST4i1ltD93xEsr37OuUkQWPl4aFvynOYhOTtqk3ZN0oCFwW2brNdkw2VlHhNSQegCX+6eeBSk0daY23JjWdFacVbpTP7SvF6TajSOKwjNtrHegrXhewAGamY5/yJe3s+/aJ+uyvNCSIGAPEy36IBRpykAK7zlERZnts= 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=qqhpxicJ; arc=none smtp.client-ip=185.246.84.56 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="qqhpxicJ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id B00E01A0F84; Wed, 24 Sep 2025 14:50:05 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 84DA560634; Wed, 24 Sep 2025 14:50:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3FA22102F18D8; Wed, 24 Sep 2025 16:50:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1758725404; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=3RHLVmk5+u09dFacYEQB1nNTSpeaQW6IgPoQKUHTSJA=; b=qqhpxicJ3nT6tP8vOjipWOKU9C6vNsKRfUJfZf7w5wdRiQYVkFR+8ap2g2hJsp6hq1zPvy +Hq8VVkEXVgGue85JcdaLgo7dLMy4s6r/Pq+DO5xR/KGvhfozEBZjwL27OgZeXrRYiTGW4 TThSZAepZ0w4o5uNCqh7aVC4kPYHSq9UoSPt5zWVmiLIOqZ2x5TGlgYM92vBP3YL2BM9uX TktR5cjDV9ABu0LfV4gv23UGgIEevWOLXjrB8vMFQsO5PqGByYxg84sGxyaAzpdMbuBlL3 4TZH5zQG7W7ZJsQl7+hEjjAoyB9dI82A7LkTBsIu4hGVMyrQ7VPCQfp6oje06w== From: "Bastien Curutchet (eBPF Foundation)" Date: Wed, 24 Sep 2025 16:49:37 +0200 Subject: [PATCH bpf-next v4 02/15] 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: <20250924-xsk-v4-2-20e57537b876@bootlin.com> References: <20250924-xsk-v4-0-20e57537b876@bootlin.com> In-Reply-To: <20250924-xsk-v4-0-20e57537b876@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 02250f29f9946d1ca701e30a900617056d91587b..679491b6b9dd80ccb2b92729141= fb8715b874c6d 100644 --- a/tools/testing/selftests/bpf/test_xsk.c +++ b/tools/testing/selftests/bpf/test_xsk.c @@ -1069,6 +1069,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); @@ -1259,6 +1261,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.51.0