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 857A22F12D4; Fri, 9 Jan 2026 11:55:40 +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=1767959740; cv=none; b=TKkEnjNVInieGaFfCTwImyl+Y3SA8Myq6L+13v7/DgC2FJ25DLXGs5r/HFXL+V+koJDkplxbqst7BgA/Han/Q8j+inJSR2g6Fz2zhUdXEtBa9cZoW8o24Pfma9UJruuSSr+CHEMFYTCWfjYLcj/iZPs0mxa/pLONVYxaXlO9Fso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767959740; c=relaxed/simple; bh=Co/LSFeuP8MlCObTDrCERn+CVBeNUEsoyPkAfoFT1QI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I/FYihv1Uvd68dDfhjoDh/FfjwHkWSrWulJW3uzbCwmawJkfsm0Qy6Ll3Vkz9iJDTw+TtFwStH5x1GCZGndkUKQ9SZ/kHb8zPJq9ikgJ7vdmGUF7QZal0gZL4YJ4cnpNcfAKTBGpB4ixiZOdAHlaz7cOE6fxjN/704MW2QvYpI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QqDji3nQ; 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="QqDji3nQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EC77C4CEF1; Fri, 9 Jan 2026 11:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767959740; bh=Co/LSFeuP8MlCObTDrCERn+CVBeNUEsoyPkAfoFT1QI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QqDji3nQyetWOvjC2kQ/5mHqfJoNDQQaDO+8dJt27yAmNtNqBIpN+pv7tWv4UaSUe XSdpGIbuV1DVZO3suc4amCz3pzkWnWXT/MfVIg3oqq57mbjI+SbegjtY5Ehuz0pvmA AF3mJIdyHrI9YxntlDQCLu101BbXTYi+aLSKn62c= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Starovoitov , Andrii Nakryiko , Eduard Zingerman , Sasha Levin Subject: [PATCH 6.6 159/737] selftests/bpf: Fix failure paths in send_signal test Date: Fri, 9 Jan 2026 12:34:58 +0100 Message-ID: <20260109112139.976866666@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260109112133.973195406@linuxfoundation.org> References: <20260109112133.973195406@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexei Starovoitov [ Upstream commit c13339039891dbdfa6c1972f0483bd07f610b776 ] When test_send_signal_kern__open_and_load() fails parent closes the pipe which cases ASSERT_EQ(read(pipe_p2c...)) to fail, but child continues and enters infinite loop, while parent is stuck in wait(NULL). Other error paths have similar issue, so kill the child before waiting on it. The bug was discovered while compiling all of selftests with -O1 instead of -O2 which caused progs/test_send_signal_kern.c to fail to load. Fixes: ab8b7f0cb358 ("tools/bpf: Add self tests for bpf_send_signal_thread()") Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20251113171153.2583-1-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin --- tools/testing/selftests/bpf/prog_tests/send_signal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_tests/send_signal.c b/tools/testing/selftests/bpf/prog_tests/send_signal.c index 9adcda7f1fedc..61c9035000149 100644 --- a/tools/testing/selftests/bpf/prog_tests/send_signal.c +++ b/tools/testing/selftests/bpf/prog_tests/send_signal.c @@ -145,6 +145,11 @@ static void test_send_signal_common(struct perf_event_attr *attr, skel_open_load_failure: close(pipe_c2p[0]); close(pipe_p2c[1]); + /* + * Child is either about to exit cleanly or stuck in case of errors. + * Nudge it to exit. + */ + kill(pid, SIGKILL); wait(NULL); } -- 2.51.0