Re: Worst recursion in the kernel

From: Russell King
Date: Thu Dec 04 2003 - 13:41:46 EST


On Thu, Dec 04, 2003 at 04:08:46PM +0100, Martin Waitz wrote:
> hi :)
>
> On Wed, Dec 03, 2003 at 10:57:43PM +0000, Russell King wrote:
> > Yes, but the condition of the /data/ is such that it will not recurse.
> >
> > A pure "can this function call that function" analysis ignoring the
> > state of the data will say this will infinitely recuse. Include
> > the data, and you'll find it has a very definite recursion limit.
>
> but it makes sense to restrucure the code to make it more
> readable/understandable even if it can be proven that the code is
> correct

Oddly that's what I have been doing, but we've run out of time to
completely eliminate the recursions in PCMCIA before the 2.6 brakes
were turned on. Sure, if someone wants to try submitting a PCMCIA
rewrite to Linus right now and wants to receive Linus' flames, go
ahead. 8)

So, for the time being, live with the fact that current automated
program analysis detects the recusion. Inteligent human examination
will tell you that it can't infinitely recurse.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/