public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] Fix /proc/slab_allocators re seq_list_next() conversion
@ 2007-06-04 12:26 Alexey Dobriyan
  2007-06-04 12:42 ` Pavel Emelianov
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2007-06-04 12:26 UTC (permalink / raw)
  To: akpm; +Cc: xemul, linux-kernel, devel

Wrong pointer was used as kmem_cache pointer.

[Here /proc/slab_allocators appears as empty file, but it's just me, probably]

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---

 mm/slab.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/slab.c
+++ b/mm/slab.c
@@ -4401,7 +4401,7 @@ static void show_symbol(struct seq_file *m, unsigned long address)
 
 static int leaks_show(struct seq_file *m, void *p)
 {
-	struct kmem_cache *cachep = p;
+	struct kmem_cache *cachep = list_entry(p, struct kmem_cache, next);
 	struct slab *slabp;
 	struct kmem_list3 *l3;
 	const char *name;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-04 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 12:26 [PATCH -mm] Fix /proc/slab_allocators re seq_list_next() conversion Alexey Dobriyan
2007-06-04 12:42 ` Pavel Emelianov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox