Re: [PATCH] Make

From: Linus Torvalds
Date: Tue May 20 2008 - 11:14:34 EST




On Tue, 20 May 2008, Alexey Dobriyan wrote:
>
> Why list_head corruptions are special?

It's not that list corruptions are special, but:
- *any* corruption is very interesting, and the earlier we find it the
better
- we have a lot of lists in the kernel, so testing pointers is actually
likely to find stuff.
- and lists are something we can *test* for corruption

That third one is important. Most random pointers we can't sanely test
because they don't have trivial and important patterns.

The second one is relevant too: some of the pointers that we *could* test
(struct task has a pointer to the thread struct and back, and we could
test that) are just not common enough to be worth testing. And other
concepts don't have any nice centralized routines for adding the test.

So no, lists aren't "special" in any inherent way, they are just special
in these kinds of "incidentally, a lot of random data structure corruption
has traditionally shown up in lists, because there are so many of them".

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