Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262827AbVCWGtQ (ORCPT ); Wed, 23 Mar 2005 01:49:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262828AbVCWGtQ (ORCPT ); Wed, 23 Mar 2005 01:49:16 -0500 Received: from linux01.gwdg.de ([134.76.13.21]:27559 "EHLO linux01.gwdg.de") by vger.kernel.org with ESMTP id S262827AbVCWGtN (ORCPT ); Wed, 23 Mar 2005 01:49:13 -0500 Date: Wed, 23 Mar 2005 07:48:31 +0100 (MET) From: Jan Engelhardt To: Payasam Manohar cc: linux-kernel@vger.kernel.org Subject: Re: segmentation fault while loading modules In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 820 Lines: 28 > int > ksignal(int pid,int signum) > { > struct task_struct x; > struct task_struct *p; > /* run through the task list of linux until we find our pid */ > //for (p = &init_task ; (p = next_task(p)) != &init_task ; ){ > for (p = &x ; (p = next_task(p)) != &x ; ){ ... next_task(p) is defined (not in the sense of a macro, though) as p->tasks.next and your x is not initiailzed, so what do you expect next_task(x) to do, if p->tasks... does not contain a valid value? You want this: for(p = &init_task; (p = next_task(p)) != &init_task; ) { ... } Jan Engelhardt -- - 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/