From manningc2@actrix.gen.nz Tue Jan 12 21:00:47 2010
Received: from smtp.firstline.co.nz ([203.167.210.162] helo=firstline.co.nz)
	by stoneboat.aleph1.co.uk with smtp (Exim 4.69)
	(envelope-from <manningc2@actrix.gen.nz>) id 1NUnqv-0008Vh-QN
	for yaffs@lists.aleph1.co.uk; Tue, 12 Jan 2010 21:00:47 +0000
Received: (qmail 20208 invoked by uid 453); 12 Jan 2010 21:00:23 -0000
X-Virus-Checked: Checked by ClamAV on firstline.co.nz
Received: from Unknown (HELO linux-dual-head.local) (10.14.210.25)
	by firstline.co.nz (qpsmtpd/0.40) with ESMTP;
	Wed, 13 Jan 2010 10:00:23 +1300
From: Charles Manning <manningc2@actrix.gen.nz>
To: yaffs@lists.aleph1.co.uk
Date: Wed, 13 Jan 2010 10:00:17 +1300
User-Agent: KMail/1.9.10
References: <916127.95432.qm@web27308.mail.ukl.yahoo.com>
	<201001121041.27814.manningc2@actrix.gen.nz>
	<6B5D4EE0C1F840D6963993A3B7790866@kwiPC>
In-Reply-To: <6B5D4EE0C1F840D6963993A3B7790866@kwiPC>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Message-Id: <201001131000.17290.manningc2@actrix.gen.nz>
X-SA-Exim-Connect-IP: 203.167.210.162
X-SA-Exim-Mail-From: manningc2@actrix.gen.nz
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=4.5 tests=AWL,BAYES_00,SPF_NEUTRAL
	autolearn=no version=3.2.5
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: Re: [Yaffs] [Yaffs2] Error  yaffs_readdir on yaffs_fs.c
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/options/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Tue, 12 Jan 2010 21:00:48 -0000

On Tuesday 12 January 2010 14:42:09 =EA=B9=80=EC=9B=90=EC=9D=BC wrote:
> hello.... charles
>
> I do display errorr point (red color).
>
> In yaffs_fs.c and yaffs_guts.c, please... confirm to file.
>
> I know...yaffs_GetObjectInode() function is getting i-node.
>
> I-node had "NULL" value.
>
> this time, yaffs filesystem  display error message.
>
> I think to lost I-node. why do lost I-node?
> what is reason? you will know me.
>
> thank you for you...
>
> as soon as.... I wish to send reason via e-mail to me.
>
>
>
>
>
>
>
>
> ----------------------------------------------------
> Kernel error Message
> ----------------------------------------------------
>
> [root@hello /mnt/mtd3/up_wait_]# ls
> Unable to handle kernel NULL pointer dereference at virtual address
> 00000030 pgd =3D c3e8c000
> [00000030] *pgd=3D33e3f031, *pte=3D00000000, *ppte=3D00000000
> Internal error: Oops: 17 [#1]
> Modules linked in:
> CPU: 0
> PC is at yaffs_GetObjectInode+0x10/0x18
> LR is at yaffs_GetObjectInode+0x10/0x18
> pc : [<c011c338>]    lr : [<c011c338>]    Not tainted
> sp : c3d77df4  ip : c3d77df4  fp : c3d77e00
> r10: 00000002  r9 : 00000002  r8 : c04924d4
> r7 : 00000001  r6 : c3e3d0d0  r5 : c04924b4  r4 : 0000002f
> r3 : 00000004  r2 : c3d77e24  r1 : 000014b2  r0 : 00000000
> Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  Segment user
> Control: 717F  Table: 33E8C000  DAC: 00000015
> Process ls (pid: 934, stack limit =3D 0xc3d76194)
> Stack: (0xc3d77df4 to 0xc3d78000)
> 7de0:                                              c3d77f4c c3d77e04
> c01154bc 7e00: c011c338 00000000 00000001 00000004 c05651a4 c0f87700
> c0e4b000 c0096db8 7e20: c3d77f74 34303255 36342e30 30333030 34312e30
> 35303736 2e343432 39303032 7e40: 30323031 37323731 312e3632 30303634
> 00303033 00000000 00000000 00000000 7e60: 00000000 00000000 00000000
> 00000000 00000000 00000000 00000000 00000000 7e80: 00000000 00000000
> 00000000 00000000 00000000 00000000 00000000 00000000 7ea0: 00000000
> 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7ec0:
> 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 7ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 7f00: 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000 7f20: 00000000 c0f876e0 c3e3d140 c3e3d0d0 fffffffe
> c0096db8 c3d76000 401babcc 7f40: c3d77f70 c3d77f50 c0096a68 c01152d4
> 0008e110 00000000 00001000 fffffff7 7f60: c0f876e0 c3d77fa4 c3d77f74
> c0096f98 c00969c8 0008e140 0008e128 00000fd0 7f80: ffffffea 00001000
> 000002b4 00000000 000000d9 c00340a4 00000000 c3d77fa8 7fa0: c0033f20
> c0096f3c 00001000 000002b4 00000003 0008e110 00001000 00000278 7fc0:
> 00001000 000002b4 00000000 000028cc 00000000 0008e0e0 401babcc beee1cf8
> 7fe0: 0008e110 beee1ca0 401bb0d0 4013473c 20000010 00000003 00000200
> 00000440 Backtrace:
> [<c011c328>] (yaffs_GetObjectInode+0x0/0x18) from [<c01154bc>]
> (yaffs_readdir+0x1f8/0x2b4) [<c01152c4>] (yaffs_readdir+0x0/0x2b4) from
> [<c0096a68>] (vfs_readdir+0xb0/0xd0) [<c00969b8>] (vfs_readdir+0x0/0xd0)
> from [<c0096f98>] (sys_getdents64+0x6c/0xc4) r8 =3D C0F876E0  r7 =3D FFFF=
=46FF7=20
> r6 =3D 00001000  r5 =3D 00000000
>  r4 =3D 0008E110
> [<c0096f2c>] (sys_getdents64+0x0/0xc4) from [<c0033f20>]
> (ret_fast_syscall+0x0/0x2c) r8 =3D C00340A4  r7 =3D 000000D9  r6 =3D 0000=
0000  r5
> =3D 000002B4
>  r4 =3D 00001000
> Code: e1a0c00d e92dd800 e24cb004 ebffed57 (e5900030)
>  Segmentation fault
>
> -----------------------------------------------------
>
>
>
>
> # source contens
>
> static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir)
> in yaffs_fs.c
>
> list_for_each(i, &obj->variant.directoryVariant.children) {
>   curoffs++;
>   if (curoffs >=3D offset) {
>    l =3D list_entry(i, yaffs_Object, siblings);
>
>    yaffs_GetObjectName(l, name,
>          YAFFS_MAX_NAME_LENGTH + 1);
>    T(YAFFS_TRACE_OS,
>      (KERN_DEBUG "yaffs_readdir: %s inode %d\n", name,
>       yaffs_GetObjectInode(l)));
>
>    if (filldir(dirent,
>         name,
>         strlen(name),
>         offset,
>         yaffs_GetObjectInode(l),
>         yaffs_GetObjectType(l))
>        < 0) {
>     goto up_and_out;
>    }
>
>    offset++;
>    f->f_pos++;
>   }
>  }


This code has been changed. Please try with the latest.
If you still get the problem then please provide a test case for this.

=2D- CHarles



