Skip to contentSkip to conversation

proc-fixup-uptime-test.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Nov 15, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: proc: fixup uptime selftest
has been removed from the -mm tree. Its filename was
proc-fixup-uptime-test.patch

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

------------------------------------------------------
From: Alexey Dobriyan <[email protected]>
Subject: proc: fixup uptime selftest
Date: Mon, 24 Oct 2022 21:08:09 +0300

syscall(3) returns -1 and sets errno on error, unlike "syscall" instruction.

Systems which have <= 32/64 CPUs are unaffected. Test won't bounce to all CPUs before completing if there are more of them.

Fixes 1f5bd0547654 ("proc: selftests: test /proc/uptime")

---

 tools/testing/selftests/proc/proc-uptime-002.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/proc/proc-uptime-002.c renamed from tools/testing/selftests/proc/proc-uptime-002.c~proc-fixup-uptime-test +2 -1
@@ -17,6 +17,7 @@
 // while shifting across CPUs.
 #undef NDEBUG
 #include <assert.h>
+#include <errno.h>
 #include <unistd.h>
 #include <sys/syscall.h>
 #include <stdlib.h>
@@ -54,7 +55,7 @@ int main(void)
 		len += sizeof(unsigned long);
 		free(m);
 		m = malloc(len);
-	} while (sys_sched_getaffinity(0, len, m) == -EINVAL);
+	} while (sys_sched_getaffinity(0, len, m) == -1 && errno == EINVAL);
 
 	fd = open("/proc/uptime", O_RDONLY);
 	assert(fd >= 0);

_

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