Re: latest -git: A peculiar case of a stuck process(ext3/sched-related?)

From: Andrew Morton
Date: Fri Jul 18 2008 - 06:33:40 EST


On Fri, 18 Jul 2008 12:17:17 +0200 "Vegard Nossum" <vegard.nossum@xxxxxxxxx> wrote:

> And the ext3_find_entry() corresponds to this line:
>
> for (; de < top; de = ext3_next_entry(de)) /* <--- HERE! */
> if (ext3_match (namelen, name, de)) {
> if (!ext3_check_dir_entry("ext3_find_entry",
> dir, de, bh,
> (block<<EXT3_BLOCK_SIZE_BITS(sb))
> +((char *)de - bh->b_data))) {
> brelse (bh);
> *err = ERR_BAD_DX_DIR;
> goto errout;
> }
> *res_dir = de;
> dx_release (frames);
> return bh;
> }
>
> Is it possible that this loop can get stuck with a corrupt filesystem image?

yup. ext2 did that a couple of times. See the explicit check for
de->rec_len == 0 in ext2_find_entry().

We fixed one filesystem and forgot the others. Again.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/