[merged mm-stable] selftests-mm-add-missing-pthread_create-return-checks-in-pkey-tests.patch removed from -mm tree

Andrew Morton <[email protected]> Thu, 30 Jul 2026 19:42:26 -0700
Newsgroups org.kernel.vger.mm-commits
Message-ID <[email protected]>
The quilt patch titled
     Subject: selftests/mm: add missing pthread_create() return checks in pkey tests
has been removed from the -mm tree.  Its filename was
     selftests-mm-add-missing-pthread_create-return-checks-in-pkey-tests.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Hongfu Li <[email protected]>
Subject: selftests/mm: add missing pthread_create() return checks in pkey tests
Date: Mon, 6 Jul 2026 16:15:59 +0800

Add missing pthread_create() return checks in pkey sighandler tests to
avoid hanging in pthread_cond_wait() when thread creation fails.

Link: https://lore.kernel.org/[email protected]
Signed-off-by: Hongfu Li <[email protected]>
Acked-by: Mike Rapoport (Microsoft) <[email protected]>
Acked-by: Liam R. Howlett (Oracle) <[email protected]>
Reviewed-by: Kevin Brodsky <[email protected]>
Tested-by: Kevin Brodsky <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Joey Gouly <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: Keith Lucas <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Muhammad Usama Anjum <[email protected]>
Cc: Ross Zwisler <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Yury Khrustalev <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 tools/testing/selftests/mm/pkey_sighandler_tests.c |   12 +++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/tools/testing/selftests/mm/pkey_sighandler_tests.c~selftests-mm-add-missing-pthread_create-return-checks-in-pkey-tests
+++ a/tools/testing/selftests/mm/pkey_sighandler_tests.c
@@ -220,7 +220,11 @@ static void test_sigsegv_handler_with_pk
 	pthread_attr_init(&attr);
 	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 
-	pthread_create(&thr, &attr, thread_segv_with_pkey0_disabled, NULL);
+	ret = pthread_create(&thr, &attr, thread_segv_with_pkey0_disabled, NULL);
+	if (ret) {
+		errno = ret;
+		pkey_assert(0);
+	}
 
 	pthread_mutex_lock(&mutex);
 	while (siginfo.si_signo == 0)
@@ -259,7 +263,11 @@ static void test_sigsegv_handler_cannot_
 	pthread_attr_init(&attr);
 	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 
-	pthread_create(&thr, &attr, thread_segv_pkuerr_stack, NULL);
+	ret = pthread_create(&thr, &attr, thread_segv_pkuerr_stack, NULL);
+	if (ret) {
+		errno = ret;
+		pkey_assert(0);
+	}
 
 	pthread_mutex_lock(&mutex);
 	while (siginfo.si_signo == 0)
_

Patches currently in -mm which might be from [email protected] are

selftests-mm-fix-memleak-in-migration-benchmark.patch
selftests-mm-factor-out-hmm_buffer_alloc-to-consolidate-buffer-setup.patch
selftests-mm-fix-bug_on-checking-wrong-variable-in-mremap_dontunmap.patch
mm-swap-fix-swap_cluster_lock-config_swap-stub-signature-mismatch.patch