public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Slab memory leak in JFFS2 filesystems
@ 2011-02-25  0:41 Johns Daniel
  2011-02-25 12:38 ` Artem Bityutskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Johns Daniel @ 2011-02-25  0:41 UTC (permalink / raw)
  To: linux-mtd

I have discovered a kernel memory leak associated with JFFS2
filesystems. I have verified the leak in kernels 2.6.28 and 2.6.36 on
a Freescale PowerPC board using this script:

while :; do FN=$(mktemp /jffs2fs/TMP.XXXXXXXX); \
   cat /proc/slabinfo |grep "dentry\|size-64 "; sleep 1; /bin/rm $FN; done

The "dentry" and "size-64" slabs grow continuously with this script --
and the memory is not reclaimed even after the script is stopped.

Basically, JFFS2 does not do a complete slab cleanup when a file is
deleted. If the old filename is reused, you don't notice the leak
because it is very small. However, if you use a new filename each
time, the memory leak is pretty obvious.

Is this a JFFS2 feature or is this a bug?
If it is a bug, does anybody have a fix for it?

-- Johns

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

end of thread, other threads:[~2011-02-28 13:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25  0:41 Slab memory leak in JFFS2 filesystems Johns Daniel
2011-02-25 12:38 ` Artem Bityutskiy
2011-02-25 16:12   ` Johns Daniel
2011-02-25 16:27     ` Artem Bityutskiy
2011-02-25 17:11       ` Johns Daniel
2011-02-28 13:46         ` Artem Bityutskiy

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