jffs2 oops

troy_ct troy_ct at 163.com
Sun Aug 14 10:49:24 EDT 2011


Hi,

I did a test like this(smp system):
mount -t jffs2 /dev/mtdblock1 /mnt
mount -t jffs2 /dev/mtdblock2 /tmp
Then I write data to /mnt/file1, /tmp/file2 simultaneously, It's very often to see
a oops says 'comprbuf is NULL in ./fs/jffs2/write.c, line 376'.

In the jffs2 file system menuconfig, I enable the option 'Advanced compression option for JFFS2'.
It turns out that thread A malloc and use the buffer in the jffs2_compressor_list,  at the same time thread B can also use the
same buffer because of spin_unlock(&jffs2_compressor_list_lock).
Thread B get the best buffer pointer and change the best pointer to NULL.  Thread A's best buffer pointer became NULL too, so oops happens.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20110814/033f9b2c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-jffs2-fix-bug-of-jffs2_compressor_list-s-race-condit.patch
Type: application/octet-stream
Size: 1502 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20110814/033f9b2c/attachment.obj>


More information about the linux-mtd mailing list