Re: [Yaffs] Yaffs bug report

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Sven Van Asbroeck
Date:  
To: manningc2, yaffs
Subject: Re: [Yaffs] Yaffs bug report
Hello Charles,

I tracked it down to InvalidateCheckPoint() in yaffs_guts.c, where dev->context is passed to markSuperBlockDirty(). The only problem is, markSuperBlockDirty() expects a parameter of type yaffs_Device!!

When I modify the function to pass dev instead of dev->context, the kernel oops disappears.

You would think the compiler would generate a warning in a case like this?

By the way, I've checked the yaffs source code in the Android git repo, and the bug has been fixed there! Do the Android yaffs bugfixes not make it upstream?

Cheers,
Sven

--- On Wed, 24/2/10, Sven Van Asbroeck <> wrote:

> From: Sven Van Asbroeck <>
> Subject: [Yaffs] Yaffs bug report
> To:
> Date: Wednesday, 24 February, 2010, 15:08
> Hello,
>
> I think I've identified a bug in yaffs:
>
> 0. Ensure a valid yaffs partition WITH A CHECKPOINT is
> available on /dev/mynand
> 1. Mount a yaffs partition: mount -t yaffs2 -o inband-tags
> /dev/mynand /mnt/flash
> 2. rm -rf /mnt/flash/*
> 3. Kernel oops !
>
> This will only happen when mounting a yaffs partition with
> a checkpoint. When no checkpoint is present, the rm works
> just fine.
>
> I thought I'd stress I'm using the inband-tags option. Also
> I'm using the latest yaffs version from cvs.
>
> Sven
>
> yaffs: dev is 32505860 name is "mtdblock4"
> yaffs: passed flags "inband-tags"
> yaffs: Attempting MTD mount on 31.4, "mtdblock4"
> yaffs: restored from checkpoint
> yaffs_read_super: isCheckpointed 1
> Unable to handle kernel paging request at virtual address
> 2d69736f
> pgd = c3be8000
> [2d69736f] *pgd=00000000
> Internal error: Oops: 1 [#1] PREEMPT
> Modules linked in:
> CPU: 0    Not tainted 
> (2.6.31-203-gee1fdae-gdc1b315-svn #4)
> PC is at yaffs_MarkSuperBlockDirty+0x14/0x40
> LR is at yaffs_InvalidateCheckpoint+0x44/0x48
> pc : [<c014f884>]    lr :
> [<c0155cd4>]    psr: 60000013
> sp : c305fb78  ip : 00000000  fp : 000061a3
> r10: 00000001  r9 : c3018000  r8 : 00000000
> r7 : c30080f8  r6 : c3018000  r5 : 00000003 
> r4 : c3018000
> r3 : 2d697363  r2 : f0000010  r1 : 00000080 
> r0 : c3aff360
> Flags: nZCv  IRQs on  FIQs on  Mode
> SVC_32  ISA ARM  Segment user
> Control: 0005317f  Table: 83be8000  DAC:
> 00000015
> Process rm (pid: 1907, stack limit = 0xc305e270)
> Stack: (0xc305fb78 to 0xc3060000)
> fb60:             
>                
>                
>          c3018000 c0155cd4
> fb80: c305fd60 c0156594 000000c9 00000001 c305fd60 c301b000
> c30080f8 00000000
> fba0: c3018000 40025000 000061a3 c015d0f8 c301b000 00000800
> 00000001 c38c5188
> fbc0: c38c5000 c01ede0c 00000000 00000000 c3431e10 00000000
> 00000000 00028130
> fbe0: 00000000 00000001 00000000 c305fd60 00000003 c301b000
> c30080f8 00000000
> fc00: c3018000 00000001 000061a3 c0157cb4 00000000 00000000
> 74746553 73676e69
> fc20: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fc40: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fc60: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fc80: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fca0: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fcc0: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fce0: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fd00: 00000000 00000000 00000000 00000000 00000000 00000000
> aaaaaaaa 00000001
> fd20: 00000660 00000000 00000000 00000000 00000000 00000000
> 00000000 00001af6
> fd40: 00000001 00000001 00000000 00000000 00000003 00000000
> 00000000 55555555
> fd60: aaaaaaaa 00000000 00000660 00000000 00000000 00000000
> 00000000 00000000
> fd80: 00000001 00000000 00000001 00000001 00000000 00000000
> 00000003 ffffffff
> fda0: ffffffff 55555555 c04f7218 c30080f8 c34e4990 c30283e0
> 0000000a c0026f44
> fdc0: c305e000 40025000 bed43cc4 c0157e28 00000000 00000000
> 00000e56 33a21d36
> fde0: c34e4e30 c01597c8 6f632e68 0000666e 00000000 00000000
> 00000000 00000000
> fe00: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fe20: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fe40: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fe60: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fe80: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fea0: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fec0: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000
> fee0: c3018000 c34e4990 c34326b8 0000000a c3018000 c34e4990
> c34326b8 0000000a
> ff00: c0026f44 c0150060 c34e4990 c34326b8 c34e4990 00000000
> c34326b8 c00be2a0
> ff20: c34e4990 c34326b8 00000000 c34e4e30 c34326b8 c00c01e0
> c305e000 c380fc20
> ff40: c34325b8 de143ea9 0000000e c3ad0014 00000000 c3429798
> 00000000 00000000
> ff60: 00000000 400dc320 00000200 c38a2c80 c3b1ecd8 c002c7bc
> 000001ec 00000000
> ff80: 000001ec 00000000 00001000 ffffffff 0009e090 c3ad0000
> 00000008 0009e090
> ffa0: 0000000c c0026dc0 00000008 0009e090 0009e090 bed43a00
> 00000000 00008000
> ffc0: 00000008 0009e090 0000000c 0000000a 0009d008 00000013
> 40025000 bed43cc4
> ffe0: 0009e090 bed43a00 00074c00 400dc32c 60000010 0009e090
> 804e4031 804e4431
> [<c014f884>] (yaffs_MarkSuperBlockDirty+0x14/0x40)
> from [<c0155cd4>]
> (yaffs_InvalidateCheckpoint+0x44/0x48)
> [<c0155cd4>] (yaffs_InvalidateCheckpoint+0x44/0x48)
> from [<c0156594>]
> (yaffs_WriteNewChunkWithTagsToNAND+0x1c/0x59c)
> [<c0156594>]
> (yaffs_WriteNewChunkWithTagsToNAND+0x1c/0x59c) from
> [<c0157cb4>] (yaffs_UpdateObjectHeader+0x29c/0x3c8)
> [<c0157cb4>] (yaffs_UpdateObjectHeader+0x29c/0x3c8)
> from [<c0157e28>] (yaffs_UpdateParent+0x48/0x4c)
> [<c0157e28>] (yaffs_UpdateParent+0x48/0x4c) from
> [<c01597c8>] (yaffs_UnlinkObject+0x28/0x154)
> [<c01597c8>] (yaffs_UnlinkObject+0x28/0x154) from
> [<c0150060>] (yaffs_unlink+0x48/0xcc)
> [<c0150060>] (yaffs_unlink+0x48/0xcc) from
> [<c00be2a0>] (vfs_unlink+0x60/0xcc)
> [<c00be2a0>] (vfs_unlink+0x60/0xcc) from
> [<c00c01e0>] (do_unlinkat+0xc0/0x148)
> [<c00c01e0>] (do_unlinkat+0xc0/0x148) from
> [<c0026dc0>] (ret_fast_syscall+0x0/0x2c)
> Code: e92d4010 e5922000 e5903074 e3120002 (e593400c)
> ---[ end trace 5f4de03391c0ad6b ]---
>
>
>      
>
>
> _______________________________________________
> yaffs mailing list
>
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>