lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211029024528.8086-2-lizhijian@cn.fujitsu.com>
Date:   Fri, 29 Oct 2021 10:45:28 +0800
From:   Li Zhijian <lizhijian@...fujitsu.com>
To:     <linux-kselftest@...r.kernel.org>, <shuah@...nel.org>
CC:     <linux-kernel@...r.kernel.org>,
        Li Zhijian <lizhijian@...fujitsu.com>,
        Christian Brauner <christian@...uner.io>,
        Philip Li <philip.li@...el.com>,
        kernel test robot <lkp@...el.com>
Subject: [PATCH 2/2] ksefltest: pidfd: Fix wait_states: Test terminated by timeout

0Day/LKP observed that the kselftest blocks foever since one of the
pidfd_wait doesn't terminate in 1 of 30 runs. After digging into
the source, we found that it blocks at:
ASSERT_EQ(sys_waitid(P_PIDFD, pidfd, &info, WCONTINUED, NULL), 0);

we can reproduce it by:
$ while true; do make run_tests -C pidfd; done

a delay to ensure that the parent can see child process WCONTINUED.

CC: Christian Brauner <christian@...uner.io>
CC: Shuah Khan <shuah@...nel.org>
CC: Philip Li <philip.li@...el.com>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Li Zhijian <lizhijian@...fujitsu.com>
---
 tools/testing/selftests/pidfd/pidfd_wait.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/pidfd/pidfd_wait.c b/tools/testing/selftests/pidfd/pidfd_wait.c
index be2943f072f6..5abd26da4caa 100644
--- a/tools/testing/selftests/pidfd/pidfd_wait.c
+++ b/tools/testing/selftests/pidfd/pidfd_wait.c
@@ -107,7 +107,9 @@ TEST(wait_states)
 
 	if (pid == 0) {
 		kill(getpid(), SIGSTOP);
+		usleep(1000);
 		kill(getpid(), SIGSTOP);
+		usleep(1000);
 		exit(EXIT_SUCCESS);
 	}
 
-- 
2.33.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ