]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
selftests/x86/fsgsbase: Reap a forgotten child
authorAndy Lutomirski <luto@kernel.org>
Wed, 26 Aug 2020 17:00:45 +0000 (10:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:43:15 +0000 (11:43 +0100)
[ Upstream commit ab2dd173330a3f07142e68cd65682205036cd00f ]

The ptrace() test forgot to reap its child.  Reap it.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/e7700a503f30e79ab35a63103938a19893dbeff2.1598461151.git.luto@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/x86/fsgsbase.c

index 15a329da59fa3086e1e2f93b5055c40c3b75028b..5f3aea210e01816d1e2c57b6708f724bb31d237d 100644 (file)
@@ -499,6 +499,9 @@ static void test_ptrace_write_gsbase(void)
 
 END:
        ptrace(PTRACE_CONT, child, NULL, NULL);
+       wait(&status);
+       if (!WIFEXITED(status))
+               printf("[WARN]\tChild didn't exit cleanly.\n");
 }
 
 int main()