+ mm-locks_freed-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     mm: locks_freed fix

has been added to the -mm tree.  Its filename is

     mm-locks_freed-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: mm: locks_freed fix
From: Nick Piggin <npiggin@xxxxxxx>

Move the lock debug checks below the page reserved checks.  Also, having
debug_check_no_locks_freed in kernel_map_pages is wrong.

Signed-off-by: Nick Piggin <npiggin@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/mm.h |    7 +------
 mm/page_alloc.c    |    8 ++++----
 2 files changed, 5 insertions(+), 10 deletions(-)

diff -puN include/linux/mm.h~mm-locks_freed-fix include/linux/mm.h
--- a/include/linux/mm.h~mm-locks_freed-fix
+++ a/include/linux/mm.h
@@ -1117,12 +1117,7 @@ static inline void vm_stat_account(struc
 
 #ifndef CONFIG_DEBUG_PAGEALLOC
 static inline void
-kernel_map_pages(struct page *page, int numpages, int enable)
-{
-	if (!PageHighMem(page) && !enable)
-		debug_check_no_locks_freed(page_address(page),
-					   numpages * PAGE_SIZE);
-}
+kernel_map_pages(struct page *page, int numpages, int enable) {}
 #endif
 
 extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
diff -puN mm/page_alloc.c~mm-locks_freed-fix mm/page_alloc.c
--- a/mm/page_alloc.c~mm-locks_freed-fix
+++ a/mm/page_alloc.c
@@ -492,15 +492,13 @@ static void __free_pages_ok(struct page 
 	int i;
 	int reserved = 0;
 
-	if (!PageHighMem(page))
-		debug_check_no_locks_freed(page_address(page),
-					   PAGE_SIZE<<order);
-
 	for (i = 0 ; i < (1 << order) ; ++i)
 		reserved += free_pages_check(page + i);
 	if (reserved)
 		return;
 
+	if (!PageHighMem(page))
+		debug_check_no_locks_freed(page_address(page),PAGE_SIZE<<order);
 	arch_free_page(page, order);
 	kernel_map_pages(page, 1 << order, 0);
 
@@ -784,6 +782,8 @@ static void fastcall free_hot_cold_page(
 	if (free_pages_check(page))
 		return;
 
+	if (!PageHighMem(page))
+		debug_check_no_locks_freed(page_address(page), PAGE_SIZE);
 	arch_free_page(page, 0);
 	kernel_map_pages(page, 1, 0);
 
_

Patches currently in -mm which might be from npiggin@xxxxxxx are

mm-arch_free_page-fix.patch
mm-locks_freed-fix.patch
mm-add-arch_alloc_page.patch
mm-fault-vs-invalidate-truncate-race-fix.patch
mm-fault-handler-to-replace-nopage-and-populate.patch
mm-fault-vs-invalidate-truncate-check.patch
radix-tree-rcu-lockless-readside.patch
sched-likely-profiling.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux