Messages in this thread |  | | | Date | Wed, 3 Dec 2003 22:57:43 +0000 | | From | Russell King <> | | Subject | Re: Worst recursion in the kernel |
| |
On Wed, Dec 03, 2003 at 08:04:40PM +0100, Jörn Engel wrote: > You are right, verify_cis_cache() does not belong into the list. > Gotta see where that bug comes from. set_cis_map() is correct, > though. It does call validate_mem(), at least in my copy of > 2.6.0-test11: > > static unsigned char * > set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flags) > { > pccard_mem_map *mem = &s->cis_mem; > if (!(s->features & SS_CAP_STATIC_MAP) && > mem->sys_start == 0) { > validate_mem(s); > ... > > You can have the current code if you are really interested. It takes > the call graph as generated by smatch and follows all function calls. > If it ever revisits a function that was already on the path, it prints > out a warning like above.
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.
-- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |