diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 16:44:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 16:44:13 -0700 |
commit | 83d7e948754cf021ed7343b122940fcc27c1bd88 (patch) | |
tree | f04ba1ecb4fa337fc2bbd49b44df07775e4636ff /mm | |
parent | fce4a1dda2f1a9a25b3e5b7cd951070e0b42a818 (diff) | |
parent | 9b090f2da85bd0df5e1a1ecfe4120b7b50358f48 (diff) | |
download | op-kernel-dev-83d7e948754cf021ed7343b122940fcc27c1bd88.zip op-kernel-dev-83d7e948754cf021ed7343b122940fcc27c1bd88.tar.gz |
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
Diffstat (limited to 'mm')
-rw-r--r-- | mm/kmemleak.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index c1d5867..aacee45 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1414,9 +1414,12 @@ static void *kmemleak_seq_next(struct seq_file *seq, void *v, loff_t *pos) ++(*pos); list_for_each_continue_rcu(n, &object_list) { - next_obj = list_entry(n, struct kmemleak_object, object_list); - if (get_object(next_obj)) + struct kmemleak_object *obj = + list_entry(n, struct kmemleak_object, object_list); + if (get_object(obj)) { + next_obj = obj; break; + } } put_object(prev_obj); |