public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] 2.6.8-rc3 slab corruption (jffs2?)
@ 2004-08-07 14:04 Russell King
  2004-08-07 21:59 ` David Woodhouse
  2004-08-08  6:12 ` Wu Jian Feng
  0 siblings, 2 replies; 12+ messages in thread
From: Russell King @ 2004-08-07 14:04 UTC (permalink / raw)
  To: Linux Kernel List, linux-mtd

Not sure exactly what caused this, but it happened while logging in
(after fixing the previous two reported problems - the first by backing
out the last change to redboot.c and the second by commenting out
ri->usercompr in fs/jffs2/read.c.)

Slab corruption: start=c1e39474, len=64
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<c032ca10>](cfi_intelext_erase_varsize+0x58/0x64)
000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 4f 6b
Prev obj: start=c1e39428, len=64
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<c02c767c>](jffs2_garbage_collect_deletion_dirent+0x80/0x8c)
000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
Next obj: start=c1e394c0, len=64
Redzone: 0x170fc2a5/0x170fc2a5.
Last user: [<c03514f8>](neigh_hh_init+0x64/0x11c)
000: 00 00 00 00 03 00 00 00 08 00 00 00 0e 00 00 00
010: 00 b0 34 c0 00 00 08 00 2b 95 1d 7b 00 c0 1b 00

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().

Any ideas?  I haven't been able to reproduce (presumably because the
erase succeeded, and we didn't need to re-erase again.)

-- 
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

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [BUG] 2.6.8-rc3 slab corruption (jffs2?)
@ 2004-08-08  9:23 Manfred Spraul
  2004-08-08  9:36 ` Russell King
  0 siblings, 1 reply; 12+ messages in thread
From: Manfred Spraul @ 2004-08-08  9:23 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel

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.

Could you double check that gcc did a tail optimization in 
cfi_intelext_erase_varsize?
I don't understand how this is possible: cfi_intelext_erase_varsize 
returns (int)0, instr->callback is a void function.
And even if there is a tail optimization: how would that affect the call 
address of the kfree() call? Perhaps gcc automatically inlined something?

--
    Manfred

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-08-10 13:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-07 14:04 [BUG] 2.6.8-rc3 slab corruption (jffs2?) Russell King
2004-08-07 21:59 ` David Woodhouse
2004-08-08  6:12 ` Wu Jian Feng
2004-08-08 10:53   ` David Woodhouse
2004-08-09  1:59     ` Wu Jian Feng
2004-08-09  6:41       ` David Woodhouse
2004-08-09 11:07         ` David Woodhouse
2004-08-09 13:17       ` David Woodhouse
2004-08-10  0:52         ` Wu Jian Feng
2004-08-10 13:16           ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2004-08-08  9:23 Manfred Spraul
2004-08-08  9:36 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox