aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/mm/pageattr.c4
-rw-r--r--include/linux/mm.h10
-rw-r--r--mm/page_alloc.c4
-rw-r--r--mm/slab.c2
4 files changed, 13 insertions, 7 deletions
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
index 0887b34bc59b..353a836ed63c 100644
--- a/arch/i386/mm/pageattr.c
+++ b/arch/i386/mm/pageattr.c
@@ -229,8 +229,8 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
229 if (PageHighMem(page)) 229 if (PageHighMem(page))
230 return; 230 return;
231 if (!enable) 231 if (!enable)
232 mutex_debug_check_no_locks_freed(page_address(page), 232 debug_check_no_locks_freed(page_address(page),
233 numpages * PAGE_SIZE); 233 numpages * PAGE_SIZE);
234 234
235 /* the return value is ignored - the calls cannot fail, 235 /* the return value is ignored - the calls cannot fail,
236 * large pages are disabled at boot time. 236 * large pages are disabled at boot time.
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ff1fa87df8d0..0ac255720f34 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1030,13 +1030,19 @@ static inline void vm_stat_account(struct mm_struct *mm,
1030} 1030}
1031#endif /* CONFIG_PROC_FS */ 1031#endif /* CONFIG_PROC_FS */
1032 1032
1033static inline void
1034debug_check_no_locks_freed(const void *from, unsigned long len)
1035{
1036 mutex_debug_check_no_locks_freed(from, len);
1037}
1038
1033#ifndef CONFIG_DEBUG_PAGEALLOC 1039#ifndef CONFIG_DEBUG_PAGEALLOC
1034static inline void 1040static inline void
1035kernel_map_pages(struct page *page, int numpages, int enable) 1041kernel_map_pages(struct page *page, int numpages, int enable)
1036{ 1042{
1037 if (!PageHighMem(page) && !enable) 1043 if (!PageHighMem(page) && !enable)
1038 mutex_debug_check_no_locks_freed(page_address(page), 1044 debug_check_no_locks_freed(page_address(page),
1039 numpages * PAGE_SIZE); 1045 numpages * PAGE_SIZE);
1040} 1046}
1041#endif 1047#endif
1042 1048
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index dafd12ec7a0c..084a2de7e52a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -446,8 +446,8 @@ static void __free_pages_ok(struct page *page, unsigned int order)
446 446
447 arch_free_page(page, order); 447 arch_free_page(page, order);
448 if (!PageHighMem(page)) 448 if (!PageHighMem(page))
449 mutex_debug_check_no_locks_freed(page_address(page), 449 debug_check_no_locks_freed(page_address(page),
450 PAGE_SIZE<<order); 450 PAGE_SIZE<<order);
451 451
452 for (i = 0 ; i < (1 << order) ; ++i) 452 for (i = 0 ; i < (1 << order) ; ++i)
453 reserved += free_pages_check(page + i); 453 reserved += free_pages_check(page + i);
diff --git a/mm/slab.c b/mm/slab.c
index d1d55279202e..f378d027c684 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3397,7 +3397,7 @@ void kfree(const void *objp)
3397 local_irq_save(flags); 3397 local_irq_save(flags);
3398 kfree_debugcheck(objp); 3398 kfree_debugcheck(objp);
3399 c = virt_to_cache(objp); 3399 c = virt_to_cache(objp);
3400 mutex_debug_check_no_locks_freed(objp, obj_size(c)); 3400 debug_check_no_locks_freed(objp, obj_size(c));
3401 __cache_free(c, (void *)objp); 3401 __cache_free(c, (void *)objp);
3402 local_irq_restore(flags); 3402 local_irq_restore(flags);
3403} 3403}