The patch titled Subject: selftests/memfd/memfd_test: fix possible NULL pointer dereference has been added to the -mm mm-unstable branch. Its filename is selftests-memfd-memfd_test-fix-possible-null-pointer-dereference.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-memfd-memfd_test-fix-possible-null-pointer-dereference.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: liuye <liuye@xxxxxxxxxx> Subject: selftests/memfd/memfd_test: fix possible NULL pointer dereference Date: Tue, 14 Jan 2025 11:21:15 +0800 If `name' is NULL, a NULL pointer may be accessed in printf. Link: https://lkml.kernel.org/r/20250114032115.58638-1-liuye@xxxxxxxxxx Signed-off-by: liuye <liuye@xxxxxxxxxx> Cc: Greg Thelen <gthelen@xxxxxxxxxx> Cc: "Isaac J. Manjarres" <isaacmanjarres@xxxxxxxxxx> Cc: Jeff Xu <jeffxu@xxxxxxxxxx> Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx> Cc: Saurav Shah <sauravshah.31@xxxxxxxxx> Cc: Shuah Khan (Samsung OSG) <shuah@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/memfd/memfd_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/testing/selftests/memfd/memfd_test.c~selftests-memfd-memfd_test-fix-possible-null-pointer-dereference +++ a/tools/testing/selftests/memfd/memfd_test.c @@ -171,7 +171,7 @@ static void mfd_fail_new(const char *nam r = sys_memfd_create(name, flags); if (r >= 0) { printf("memfd_create(\"%s\", %u) succeeded, but failure expected\n", - name, flags); + name ? name : "NULL", flags); close(r); abort(); } _ Patches currently in -mm which might be from liuye@xxxxxxxxxx are mm-vmscan-fix-hard-lockup-in-function-isolate_lru_folios.patch selftests-memfd-memfd_test-fix-possible-null-pointer-dereference.patch