Clobbered file after jffs2 mount

David Woodhouse dwmw2 at infradead.org
Fri Sep 21 19:38:39 EDT 2007


On Fri, 2007-09-21 at 13:23 -0400, Jon Ringle wrote:
> Hello,
> 
> This falls under the category of bizarre behavior and I'm hoping someone 
> on this list can help.

Yes, that is indeed bizarre.

> I have a jffs2 filesystem on my target (IXP455 processor) running Linux 
> 2.6.16.29. Sometimes the first time that Linux mounts the jffs2 
> filesystem after reflashing the jffs2 image, sshd would strangely 
> misbehave and not allow incoming connections. After much 
> troubleshooting, it was discovered that the md5sum of the sshd file was 
> different than the expected md5sum. However, if the system is rebooted, 
> then sshd works correctly and the md5sum of sshd on the target magically 
> corrected itself to the expected value.

My first inclination is to suspect that somehow the pages of sshd got
scribbled on in RAM. Is the corruption repeatable? 

Can you instrument jffs2_read_inode_range() to print a hex dump of the
"offending" bytes as soon as they've been read?

Can you boot directly into a shell (init=/bin/sh) and then md5sum the
offending file?

-- 
dwmw2




More information about the linux-mtd mailing list