[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FW: Zlib compress



It is a alignment exception in the case and I found jffs2_zlib_compress
will cause word aligment problem. I tried to print datalen and cdatalen
using the following codes and I found the result before crash.

printk("jffs2_zlib_compress START %d %d\n", *datalen, *cdatalen);
	ret = jffs2_zlib_compress(data_in, cpage_out, datalen,
cdatalen);
printk("jffs2_zlib_compress END %d %d\n", *datalen, *cdatalen);


jffs2_zlib_compress START 128 128
jffs2_zlib_compress START 125 122

Because datalen is 125 now, in function jffs2_write_inode_range 

		buf += datalen;    ----> buf += 125;

And next time, mtd module will use *(__u16*)buf to access the buffer and
cause alignment exception.



Unhandled fault: alignment exception (93) at 0x00000001
fault-common.c 96
Internal error: Oops: 0
CPU: 0
pc : [<00017024>]    lr : [<00030001>]    Not tainted
sp : 00241c88  ip : 00000004  fp : 00241d1c
r10: 00000001  r9 : 60000013  r8 : 0026f440
r7 : 00000000  r6 : 000e9e74  r5 : e1dc10b0  r4 : 60000013
r3 : 00000000  r2 : 00240008  r1 : 00241c88  r0 : 00000004
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  Segment kernel


Steve Tsai



startec@xxxxxxx.net said:
> Do you have any recommand to trace the problem? Do I enable the debug 
> code in the JFFS2 or just trace specified files only? Right now I use 
> the following codes to disable zlib comproession and it works fine so 
> far.

Can you show the exact error messages that you see when it crashes?

--
dwmw2



To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com