From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261974AbTLCW5t (ORCPT ); Wed, 3 Dec 2003 17:57:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262074AbTLCW5t (ORCPT ); Wed, 3 Dec 2003 17:57:49 -0500 Received: from caramon.arm.linux.org.uk ([212.18.232.186]:43530 "EHLO caramon.arm.linux.org.uk") by vger.kernel.org with ESMTP id S261974AbTLCW5s (ORCPT ); Wed, 3 Dec 2003 17:57:48 -0500 Date: Wed, 3 Dec 2003 22:57:43 +0000 From: Russell King To: =?iso-8859-1?Q?J=F6rn_Engel?= Cc: David Hinds , linux-kernel@vger.kernel.org Subject: Re: Worst recursion in the kernel Message-ID: <20031203225743.A25889@flint.arm.linux.org.uk> Mail-Followup-To: =?iso-8859-1?Q?J=F6rn_Engel?= , David Hinds , linux-kernel@vger.kernel.org References: <20031203143122.GA6470@wohnheim.fh-wedel.de> <20031203100709.B6625@sonic.net> <20031203190440.GA15857@wohnheim.fh-wedel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <20031203190440.GA15857@wohnheim.fh-wedel.de>; from joern@wohnheim.fh-wedel.de on Wed, Dec 03, 2003 at 08:04:40PM +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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