lkml.org 
[lkml]   [2004]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] 2.6.8-rc3 slab corruption (jffs2?)
On Sun, Aug 08, 2004 at 11:23:06AM +0200, Manfred Spraul wrote:
> rmk wrote:
> >Due to tail call optimisation, its difficult to work out exactly what's
> >going on, but the first seems to be a kfree call from the erase callback
> >(possibly jffs2_erase_callback). The second function is the call to
> >jffs2_free_full_dirent() in jffs2_garbage_collect_deletion_dirent().
>
> I'd concentrate on cfi_intelext_erase_varsize+0x58/0x64:
> When slab encounters a corruption, it dumps three objects: the corrupted
> one, the previous one and the next one. Theoretically, a write
> before/after the end of the object could corrupt the neighboring object,
> but probably the first function is the relevant one.

Remember - we report the _return_ address of a function when we use
__builtin_return_address(0) in that function.

This means that if kfree() is called from a tail-call optimised
position, the reported address will be the parent function of the
one which actually called it.

Therefore, cfi_intelext_erase_varsize() called some other function
(in this case, via a function pointer) which then called kfree() in
a tail-call optimised position. jffs2_erase_callback() would be
called from this function pointer and does have kfree() in a tail-call
optimised position.

However, reading the code around jffs2_erase_callback() and
jffs2_erase_block(), I can find nothing obviously wrong.

The main problem is that I don't actually know what triggered it in the
first place - I'd just booted the machine and was just logging in when
it poped up, but repeating this does not cause the problem.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:1.211 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site