Re: Hard lock when mounting loopback file

From: Prof. Brand (brand@jupiter.cs.uni-dortmund.de)
Date: Mon Jan 14 2002 - 05:58:25 EST


Andrew Morton <akpm@zip.com.au> said:

[...]

> I don't know a thing about fat layout, but it appears that it uses a
> linked list of blocks, and if that list ends up pointing back onto
> itself, the kernel goes into an infinite loop in several places chasing
> its way to the end of the list.

Right.

> The below patch fixed it for me, and I was able to mount and read
> your filesystem image.

AFAIKS, this just cures the case where the wild pointer points to the first
block of the offending file. You should perhaps count the blocks you go
through, so a file something like:

 -------+-----+
        ^ |
        | |
        +-----+

or other strange pointer messups don't get you.

BTW, is fsck (the Linux or the Win32 variety) able to fix this?

-- 
Horst von Brand			     http://counter.li.org # 22616
-
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/



This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 21:00:44 EST