* [patch 02/10] PI-futex: introduce debug_check_no_locks_freed()
@ 2006-03-25 18:45 Ingo Molnar
0 siblings, 0 replies; only message in thread
From: Ingo Molnar @ 2006-03-25 18:45 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Gleixner, Linus Torvalds, Andrew Morton, Arjan van de Ven
add debug_check_no_locks_freed(), as a central inline to add
bad-lock-free-debugging functionality to.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
----
arch/i386/mm/pageattr.c | 4 ++--
include/linux/mm.h | 10 ++++++++--
mm/page_alloc.c | 4 ++--
mm/slab.c | 2 +-
4 files changed, 13 insertions(+), 7 deletions(-)
Index: linux-pi-futex.mm.q/arch/i386/mm/pageattr.c
===================================================================
--- linux-pi-futex.mm.q.orig/arch/i386/mm/pageattr.c
+++ linux-pi-futex.mm.q/arch/i386/mm/pageattr.c
@@ -229,8 +229,8 @@ void kernel_map_pages(struct page *page,
if (PageHighMem(page))
return;
if (!enable)
- mutex_debug_check_no_locks_freed(page_address(page),
- numpages * PAGE_SIZE);
+ debug_check_no_locks_freed(page_address(page),
+ numpages * PAGE_SIZE);
/* the return value is ignored - the calls cannot fail,
* large pages are disabled at boot time.
Index: linux-pi-futex.mm.q/include/linux/mm.h
===================================================================
--- linux-pi-futex.mm.q.orig/include/linux/mm.h
+++ linux-pi-futex.mm.q/include/linux/mm.h
@@ -1066,13 +1066,19 @@ static inline void vm_stat_account(struc
}
#endif /* CONFIG_PROC_FS */
+static inline void
+debug_check_no_locks_freed(const void *from, unsigned long len)
+{
+ mutex_debug_check_no_locks_freed(from, len);
+}
+
#ifndef CONFIG_DEBUG_PAGEALLOC
static inline void
kernel_map_pages(struct page *page, int numpages, int enable)
{
if (!PageHighMem(page) && !enable)
- mutex_debug_check_no_locks_freed(page_address(page),
- numpages * PAGE_SIZE);
+ debug_check_no_locks_freed(page_address(page),
+ numpages * PAGE_SIZE);
}
#endif
Index: linux-pi-futex.mm.q/mm/page_alloc.c
===================================================================
--- linux-pi-futex.mm.q.orig/mm/page_alloc.c
+++ linux-pi-futex.mm.q/mm/page_alloc.c
@@ -447,8 +447,8 @@ static void __free_pages_ok(struct page
arch_free_page(page, order);
if (!PageHighMem(page))
- mutex_debug_check_no_locks_freed(page_address(page),
- PAGE_SIZE<<order);
+ debug_check_no_locks_freed(page_address(page),
+ PAGE_SIZE<<order);
for (i = 0 ; i < (1 << order) ; ++i)
reserved += free_pages_check(page + i);
Index: linux-pi-futex.mm.q/mm/slab.c
===================================================================
--- linux-pi-futex.mm.q.orig/mm/slab.c
+++ linux-pi-futex.mm.q/mm/slab.c
@@ -3390,7 +3390,7 @@ void kfree(const void *objp)
local_irq_save(flags);
kfree_debugcheck(objp);
c = virt_to_cache(objp);
- mutex_debug_check_no_locks_freed(objp, obj_size(c));
+ debug_check_no_locks_freed(objp, obj_size(c));
__cache_free(c, (void *)objp);
local_irq_restore(flags);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-25 18:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-25 18:45 [patch 02/10] PI-futex: introduce debug_check_no_locks_freed() Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome