On Wed, 07 Jul 2010 08:25:22 +0200, Łukasz_Wójcicki wrote: > Does this patch eliminate the problem? No, it just detects a likely cause. I think the root cause exists somewhere else. > Unfortunately I can not generate this error again because after > re-formatting the memory (mkfs.nilfs2) the problem disappeared. All right, I'll try to fix the problem based on the review of btree code, or at least will include a patch to help debugging this. Thanks, Ryusuke Konishi > Dnia 2010-07-07, śro o godzinie 15:02 +0900, Ryusuke Konishi pisze: > > Hi, > > > > On Tue, 06 Jul 2010 11:02:41 +0200, Łukasz_Wójcicki wrote: > > > I'am using kernel 2.6.20 with nilf_utils-2-0-18 and nilfs kernel module > > > 2-0-20 . > > > > > > <1>Unable to handle kernel NULL pointer dereference at virtual address > > > 00000000 > > > <1>pgd = c4eb0000 > > > <1>[00000000] *pgd=c4e2d031, *pte=00000000, *ppte=00000000 > > > <4>Internal error: Oops: 17 [#1] > > > <4>Modules linked in: > > > <4>CPU: 0 > > > <4>PC is at nilfs_btree_lookup_dirty_buffers+0x10c/0x1ec > > > <4>LR is at 0xc4c99b24 > > <snip> > > > > Could you try the following patch to narrow down the cause? > > > > There is a function lacking range check in the btree code. This patch > > will catch the defect if the oops comes from a range error. > > > > I'm now reviewing the btree code to find out root cause of the range > > error. > > > > Thanks, > > Ryusuke Konishi > > --- > > > > diff --git a/fs/btree.c b/fs/btree.c > > index beb11fe..9622ff4 100644 > > --- a/fs/btree.c > > +++ b/fs/btree.c > > @@ -2007,6 +2007,15 @@ static void nilfs_btree_add_dirty_buffer(struct nilfs_btree *btree, > > node = (struct nilfs_btree_node *)bh->b_data; > > key = nilfs_btree_node_get_key(node, 0); > > level = nilfs_btree_node_get_level(node); > > + if (level < NILFS_BTREE_LEVEL_NODE_MIN || > > + level >= NILFS_BTREE_LEVEL_MAX) { > > + dump_stack(); > > + printk(KERN_CRIT > > + "%s: invalid btree level: %d (ino=%lu)\n", __func__, > > + level, NILFS_BMAP_I(&btree->bt_bmap)->vfs_inode.i_ino); > > + return; > > + } > > + > > list_for_each(head, &lists[level]) { > > cbh = list_entry(head, struct buffer_head, b_assoc_buffers); > > cnode = (struct nilfs_btree_node *)cbh->b_data; > > -- > To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html ��.n��������+%������w��{.n�����{��x�~���n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�