All of lore.kernel.org
 help / color / mirror / Atom feed
* + selftests-mm-cow-modify-the-incorrect-checking-parameters.patch added to mm-unstable branch
@ 2025-01-13  4:29 Andrew Morton
  2025-01-13  5:16 ` Hao Ge
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2025-01-13  4:29 UTC (permalink / raw)
  To: mm-commits, sj, shuah, gehao, akpm


The patch titled
     Subject: selftests/mm/cow: modify the incorrect checking parameters
has been added to the -mm mm-unstable branch.  Its filename is
     selftests-mm-cow-modify-the-incorrect-checking-parameters.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-cow-modify-the-incorrect-checking-parameters.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: Hao Ge <gehao@kylinos.cn>
Subject: selftests/mm/cow: modify the incorrect checking parameters
Date: Mon, 13 Jan 2025 11:28:58 +0800

In run_with_memfd_hugetlb(), some error handle have passed incorrect
parameters.  It should be "smem", but it was mistakenly written as "mem".

Let's fix it.

Link: https://lkml.kernel.org/r/20250113032858.63670-1-hao.ge@linux.dev
Fixes: baa489fabd01 ("selftests/vm: rename selftests/vm to selftests/mm")
Signed-off-by: Hao Ge <gehao@kylinos.cn>
Cc: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/cow.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/tools/testing/selftests/mm/cow.c~selftests-mm-cow-modify-the-incorrect-checking-parameters
+++ a/tools/testing/selftests/mm/cow.c
@@ -1692,7 +1692,7 @@ static void run_with_memfd_hugetlb(non_a
 		goto close;
 	}
 	smem = mmap(NULL, hugetlbsize, PROT_READ, MAP_SHARED, fd, 0);
-	if (mem == MAP_FAILED) {
+	if (smem == MAP_FAILED) {
 		ksft_test_result_fail("mmap() failed\n");
 		goto munmap;
 	}
@@ -1704,7 +1704,7 @@ static void run_with_memfd_hugetlb(non_a
 	fn(mem, smem, hugetlbsize);
 munmap:
 	munmap(mem, hugetlbsize);
-	if (mem != MAP_FAILED)
+	if (smem != MAP_FAILED)
 		munmap(smem, hugetlbsize);
 close:
 	close(fd);
_

Patches currently in -mm which might be from gehao@kylinos.cn are

selftests-mm-cow-modify-the-incorrect-checking-parameters.patch


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-13  5:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13  4:29 + selftests-mm-cow-modify-the-incorrect-checking-parameters.patch added to mm-unstable branch Andrew Morton
2025-01-13  5:16 ` Hao Ge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.