lkml.org 
[lkml]   [1999]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: e2fsck 1.17 dumps core: SIG 11
From

Keith Zaback had very good eyes, and spotted the problem. I'll be
releasing a new version of e2fsprogs 1.18 with the following fix. The
core dump happened if you had garbage written into the inode table such
that the AFS/imagic flag in the inode set.

The number of bug reports that have come in a short time is quite
disturbing, actually, since this kind of corruption really should be
quite rare.

One theory is that on some systems, if the system is writing to the
inode table at the moment when power is dropped, the disk is the last
subsystem to stop functioning, and will complete the data transfer; on
the other hand, memory tends to be the most sensitive to voltage drops,
and it may be that the memory is returning garbage, but disk write
transaction is being completed anyway. This doesn't explain all of the
reported corruption cases, but I suspect this may explain some of them.

In any case, here's the patches to make e2fsprogs 1.17 not coredump in
the presence of the imagic inode flag.

- Ted

Index: pass4.c
===================================================================
RCS file: /usr/src/CVS-REPO/e2fsprogs/e2fsck/pass4.c,v
retrieving revision 1.18
diff -u -r1.18 pass4.c
--- pass4.c 1999/10/21 19:29:44 1.18
+++ pass4.c 1999/11/07 18:33:37
@@ -154,8 +154,9 @@
ext2fs_free_icount(ctx->inode_link_info); ctx->inode_link_info = 0;
ext2fs_free_icount(ctx->inode_count); ctx->inode_count = 0;
ext2fs_free_inode_bitmap(ctx->inode_bb_map);
- ext2fs_free_inode_bitmap(ctx->inode_imagic_map);
ctx->inode_bb_map = 0;
+ ext2fs_free_inode_bitmap(ctx->inode_imagic_map);
+ ctx->inode_imagic_map = 0;
#ifdef RESOURCE_TRACK
if (ctx->options & E2F_OPT_TIME2) {
e2fsck_clear_progbar(ctx);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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