From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 51F2E349AFE; Wed, 3 Dec 2025 16:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764777650; cv=none; b=GsWEBpXy8lzXHYxsQ1rSAxIJQjUoG2KlhtBcrMXa6r4SXsqmrDWL6PGqQdGoGfopVUJIvUGp6EtED7RnmQY7IZF9g4LHq0gCPw/w3VndM4rrMJAZVLUP4yKxx5jf+UhKHK9FIFZGWvqbiGHAyLa8uIXRGGzRHYTfoqjmlRVowiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764777650; c=relaxed/simple; bh=pJEqITZGeDsJBtPbNfGs8XhRL5ZYK5Yd3s1ItrgeYJA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F3EAUfbpfdL/d9w8BgDZc2a6wfic5xWURA41Rp/1rkIA+rTc+YBrc2IABVtN122HQN+oPXQTxa5Q/elfWHxFeO4ojYGEIH4b0xTYXMhwb1XEkqUD8vG6IaAmtHJO7TyzxRilRKsFKB/onyJP/q+7gfnhsMloaaS76dVkTLGwiaI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DIumkuPJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DIumkuPJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3003C4CEF5; Wed, 3 Dec 2025 16:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764777650; bh=pJEqITZGeDsJBtPbNfGs8XhRL5ZYK5Yd3s1ItrgeYJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DIumkuPJ/897RmQIQ5qs/FwqWQfmTzhy8LAH1NFsH8s3Zgw4VK/siV18p7K9/Z0R+ CjzzHha8N85TMoRR7XZGe9t3pG3PlRjTY8R+IhY2PH38MLIJi3SHtOJRf9Zaiil4O/ dpkbrwjPX0A+x6HtX2aBfKUljh4/IWys35Y8t3fg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wake Liu , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 096/392] selftests/net: Ensure assert() triggers in psock_tpacket.c Date: Wed, 3 Dec 2025 16:24:06 +0100 Message-ID: <20251203152417.634809234@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203152414.082328008@linuxfoundation.org> References: <20251203152414.082328008@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wake Liu [ Upstream commit bc4c0a48bdad7f225740b8e750fdc1da6d85e1eb ] The get_next_frame() function in psock_tpacket.c was missing a return statement in its default switch case, leading to a compiler warning. This was caused by a `bug_on(1)` call, which is defined as an `assert()`, being compiled out because NDEBUG is defined during the build. Instead of adding a `return NULL;` which would silently hide the error and could lead to crashes later, this change restores the original author's intent. By adding `#undef NDEBUG` before including , we ensure the assertion is active and will cause the test to abort if this unreachable code is ever executed. Signed-off-by: Wake Liu Link: https://patch.msgid.link/20250809062013.2407822-1-wakel@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- tools/testing/selftests/net/psock_tpacket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/psock_tpacket.c b/tools/testing/selftests/net/psock_tpacket.c index 93092d13b3c59..ca0d9a5a9e08c 100644 --- a/tools/testing/selftests/net/psock_tpacket.c +++ b/tools/testing/selftests/net/psock_tpacket.c @@ -22,6 +22,7 @@ * - TPACKET_V3: RX_RING */ +#undef NDEBUG #include #include #include -- 2.51.0