Re: [RFC PATCH] explicitly mark recursion count

Linus Torvalds
2004-06-02T15:12:59Z

On Wed, 2 Jun 2004, Jörn Engel wrote:
>
> Can I read this as:
> Linus himself will use strong words to enforce all recursions in the
> kernel to be either removed or properly documented.

If we have a good detector that is reliable and easy to run, why not?

It will take some time, but I think the problem so far has been that the
recursion can be hard to see. Some "core" cases are well-known (memory
allocations during memory allocation, and filename lookup), and they
should be trivial to annotate. Knock wood. Others might be worse.

> In that case, you have 273 recursions to deal with. They are all in
> the data I attached a few posts back. Recursions would basically be
> in the same league as huge stack hogs, sounds good.

Yes. And with huge stack hogs, we've not exactly "fixed them all in a
weekend", have we? But having a few people run the checking tools and
nagging every once in a while ends up eventually fixing things. At least
the most common ones.

Linus