Commit 83d7e948 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-2.6-cm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-2.6-cm:
  kmemleak: Initialise kmemleak after debug_objects_mem_init()
  kmemleak: Select DEBUG_FS unconditionally in DEBUG_KMEMLEAK
  kmemleak: Do not return a pointer to an object that kmemleak did not get
parents fce4a1dd 9b090f2d
...@@ -580,8 +580,8 @@ asmlinkage void __init start_kernel(void) ...@@ -580,8 +580,8 @@ asmlinkage void __init start_kernel(void)
#endif #endif
page_cgroup_init(); page_cgroup_init();
enable_debug_pagealloc(); enable_debug_pagealloc();
kmemleak_init();
debug_objects_mem_init(); debug_objects_mem_init();
kmemleak_init();
setup_per_cpu_pageset(); setup_per_cpu_pageset();
numa_policy_init(); numa_policy_init();
if (late_time_init) if (late_time_init)
......
...@@ -400,7 +400,7 @@ config DEBUG_KMEMLEAK ...@@ -400,7 +400,7 @@ config DEBUG_KMEMLEAK
depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \
(X86 || ARM || PPC || MIPS || S390 || SPARC64 || SUPERH || MICROBLAZE || TILE) (X86 || ARM || PPC || MIPS || S390 || SPARC64 || SUPERH || MICROBLAZE || TILE)
select DEBUG_FS if SYSFS select DEBUG_FS
select STACKTRACE if STACKTRACE_SUPPORT select STACKTRACE if STACKTRACE_SUPPORT
select KALLSYMS select KALLSYMS
select CRC32 select CRC32
......
...@@ -1414,9 +1414,12 @@ static void *kmemleak_seq_next(struct seq_file *seq, void *v, loff_t *pos) ...@@ -1414,9 +1414,12 @@ static void *kmemleak_seq_next(struct seq_file *seq, void *v, loff_t *pos)
++(*pos); ++(*pos);
list_for_each_continue_rcu(n, &object_list) { list_for_each_continue_rcu(n, &object_list) {
next_obj = list_entry(n, struct kmemleak_object, object_list); struct kmemleak_object *obj =
if (get_object(next_obj)) list_entry(n, struct kmemleak_object, object_list);
if (get_object(obj)) {
next_obj = obj;
break; break;
}
} }
put_object(prev_obj); put_object(prev_obj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment