oops line 231 of latest readinode.c

David Woodhouse dwmw2 at infradead.org
Sat Nov 20 13:04:28 EST 2004


On Wed, 2004-11-17 at 15:56 +0000, Simon Haynes wrote:
> In my case all arguments appear to be valid kernel addresses. The call to 
> jffs2_lookup_node_frag returns a 0.  So the 'if (this)' takes the else route 
> and lastend is set to 0. We then execute the code in if (lastend <= 
> newfrag->ofs)' and then in the next if as newfrag->ofs contains -1. The oops 
> is produced by the line 'if(this->node)' because this is 0. I have checked 
> this against the latest CVS code and it would seem that this could still 
> happen.
> 
> I don't really know the flow of the code here but could I just put 
> 'if(this)' in front of 'if(this->node)' or is there some other more serious 
> problem here.

Looks like a correct diagnosis and cure; thanks. 

This can only happen 
if ((lastend-1) >> PAGE_CACHE_SHIFT == newfrag->ofs >> PAGE_CACHE_SHIFT)

That's if you have no previous nodes in the fragtree, and the _first_
node it finds is in the range 0xFFFFF000-0xFFFFFFFF (the last possible
page of the file).

Do you have a file with data in that range? This will trigger only if
garbage collection has happened such that a node in that range is the
one with the lowest version number.

Actually I'm not going to make it also depend on (this) but on (lastend)
since it keeps the logic in the above statement consistent, and has much
the same effect.


-- 
dwmw2
-------------- next part --------------
An embedded message was scrubbed...
From: David Woodhouse <dwmw2 at infradead.org>
Subject: mtd/fs/jffs2 readinode.c,1.116,1.117
Date: Sat, 20 Nov 2004 18:06:57 +0000
Size: 3480
Url: http://lists.infradead.org/pipermail/linux-mtd/attachments/20041120/ffda4f6f/attachment.mht 


More information about the linux-mtd mailing list