jffs2_mark_node_obsolete race w.r.t erase_free_sem?

Joakim Tjernlund joakim.tjernlund at transmode.se
Fri Jun 22 07:27:30 EDT 2007


I belive this jffs2_mark_node_obsolete can race against
jffs2_erase_pending_blocks(run in pdflush context).

During jffs2_build_filesystem, the flag JFFS2_SB_FLAG_BUILDING is set and
the erase_free_sem is NOT taken. There is nothing I can see that
holds pdflush back from erasing blocks during this time.
Confirmation would be great.

Dunno what the fix should be. Gut feeling is to prevent pdflush
from running until after build phase as erasing blocks is
a background task that shouldn't interfere with other tasks if
it can be helpt.

I think this is the root cause to the OOPS:es I seen lately

 Jocke





More information about the linux-mtd mailing list