All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] selftests-mm-uffd-remove-static-address-usage-in-shmem_allocate_area-v2.patch removed from -mm tree
@ 2025-11-20 21:37 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-11-20 21:37 UTC (permalink / raw)
  To: mm-commits, vbabka, surenb, shuah, rppt, peterx, mhocko,
	lorenzo.stoakes, liam.howlett, david, david.hunter.linux,
	mehdi.benhadjkhelifa, akpm


The quilt patch titled
     Subject: selftests/mm/uffd: remove static address usage in shmem_allocate_area()
has been removed from the -mm tree.  Its filename was
     selftests-mm-uffd-remove-static-address-usage-in-shmem_allocate_area-v2.patch

This patch was dropped because it was folded into selftests-mm-uffd-remove-static-address-usage-in-shmem_allocate_area.patch

------------------------------------------------------
From: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Subject: selftests/mm/uffd: remove static address usage in shmem_allocate_area()
Date: Thu, 13 Nov 2025 15:20:33 +0100

make cleanup code more clear, per Mike

Link: https://lkml.kernel.org/r/20251113142050.108638-1-mehdi.benhadjkhelifa@gmail.com
Signed-off-by: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Suggested-by: Mike Rapoport <rppt@kernel.org>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Hunter <david.hunter.linux@gmail.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/uffd-common.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/tools/testing/selftests/mm/uffd-common.c~selftests-mm-uffd-remove-static-address-usage-in-shmem_allocate_area-v2
+++ a/tools/testing/selftests/mm/uffd-common.c
@@ -6,7 +6,6 @@
  */
 
 #include "uffd-common.h"
-#include "asm-generic/mman-common.h"
 
 uffd_test_ops_t *uffd_test_ops;
 uffd_test_case_ops_t *uffd_test_case_ops;
@@ -151,7 +150,7 @@ static int shmem_allocate_area(uffd_glob
 		return -errno;
 	}
 
-	p = (char *)reserve;
+	p = reserve;
 	p_alias = p;
 	p_alias += bytes;
 	p_alias += hpage_size;  /* Prevent src/dst VMA merge */
@@ -159,8 +158,8 @@ static int shmem_allocate_area(uffd_glob
 	*alloc_area = mmap(p, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED,
 			   mem_fd, offset);
 	if (*alloc_area == MAP_FAILED) {
-		munmap(reserve, region_size);
 		*alloc_area = NULL;
+		munmap(reserve, region_size);
 		close(mem_fd);
 		return -errno;
 	}
@@ -170,8 +169,8 @@ static int shmem_allocate_area(uffd_glob
 	area_alias = mmap(p_alias, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED,
 			  mem_fd, offset);
 	if (area_alias == MAP_FAILED) {
-		munmap(reserve, region_size);
 		*alloc_area = NULL;
+		munmap(reserve, region_size);
 		close(mem_fd);
 		return -errno;
 	}
_

Patches currently in -mm which might be from mehdi.benhadjkhelifa@gmail.com are

selftests-mm-uffd-remove-static-address-usage-in-shmem_allocate_area.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-20 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 21:37 [folded-merged] selftests-mm-uffd-remove-static-address-usage-in-shmem_allocate_area-v2.patch removed from -mm tree Andrew Morton

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.