This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Mon Jun 5 21:47:03 2023 Received: from spaans.ds9a.nl (adsl-xs4all.ds9a.nl [213.84.159.51]) by kylie.puddingonline.com (8.11.6/8.11.6) with SMTP id g8IEwHX25378 for ; Wed, 18 Sep 2002 16:58:17 +0200 Received: (qmail 4564 invoked from network); 18 Sep 2002 06:56:08 -0000 Received: from unknown (HELO spaans.ds9a.nl) (3ffe:8280:10:360:202:44ff:fe2a:a1dd) by mayo.ipv6.ds9a.nl with SMTP; 18 Sep 2002 06:56:08 -0000 Received: (qmail 14288 invoked by uid 1000); 17 Sep 2002 20:30:49 -0000 Received: (maildatabase); juh Received: (qmail 14692 invoked by alias); 2 Oct 2001 15:52:05 -0000 Received: (qmail 14673 invoked from network); 2 Oct 2001 15:52:04 -0000 Received: from vvtp.tn.tudelft.nl (HELO vvtp.nl) (qmailr@130.161.252.29) by spaans.ds9a.nl with SMTP; 2 Oct 2001 15:52:04 -0000 Received: (qmail 17576 invoked by uid 2547); 2 Oct 2001 15:33:35 -0000 Received: (qmail 17409 invoked from network); 2 Oct 2001 15:33:33 -0000 Received: from vger.kernel.org (199.183.24.194) by vvtp.tn.tudelft.nl with SMTP; 2 Oct 2001 15:33:33 -0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 2 Oct 2001 11:49:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 2 Oct 2001 11:48:57 -0400 Received: from gap.cco.caltech.edu ([131.215.139.43]:5825 "EHLO gap.cco.caltech.edu") by vger.kernel.org with ESMTP id ; Tue, 2 Oct 2001 11:48:33 -0400 Received: from mx1.redhat.com (mx1.redhat.com [199.183.24.1]) by gap.cco.caltech.edu (8.9.3/8.9.3) with ESMTP id IAA25843 for ; Tue, 2 Oct 2001 08:22:37 -0700 (PDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.44.254]) by mx1.redhat.com (8.11.3/8.11.3) with ESMTP id f929Lcu13999; Tue, 2 Oct 2001 05:21:38 -0400 Received: from mx.hsv.redhat.com (IDENT:root@spot.hsv.redhat.com [172.16.16.7]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id f92FMXN08126; Tue, 2 Oct 2001 11:22:33 -0400 Received: from dhcp-177.hsv.redhat.com (dhcp-177.hsv.redhat.com [172.16.17.177]) by mx.hsv.redhat.com (8.11.0/8.11.0) with SMTP id f92FMdE11339; Tue, 2 Oct 2001 10:22:39 -0500 Date: Tue, 2 Oct 2001 10:23:06 -0500 From: Tommy Reynolds To: "Dinesh Gandhewar" Cc: mlist-linux-kernel@nntp-server.caltech.edu Subject: Re: Message-Id: <20011002102306.49730a0b.reynolds@redhat.com> In-Reply-To: <20011002152945.15180.qmail@mailweb16.rediffmail.com> References: <20011002152945.15180.qmail@mailweb16.rediffmail.com> Organization: Red Hat Software, Inc. / Embedded Development X-Mailer: Sylpheed version 0.6.2cvs9 (GTK+ 1.2.9; ) X-Face: Nr)Jjr was pleased to say: > I have written a linux kernel module. The linux version is 2.2.14. > In this module I have declared an array of size 2048. If I use this array, the > execution of this module function causes kernel to reboot. If I kmalloc() this > array then execution of this module function doesnot cause any problem. > Can you explain this behaviour? Unlike userland application programming, the kernel stack does not grow: it has a fixed size. You are using too much stack space and corrupting your system. The kernel stack is quite small (less than 8K is available for ALL nested modules and interrupt handlers), so driver functions should use an absolute minimum of local variables, such as a pointer to a per-instance data area. Kernel-leval kmalloc() is efficient enough to use frequently. ---------------------------------------------+----------------------------- Tommy Reynolds | mailto: Red Hat, Inc., Embedded Development Services | Phone: +1.256.704.9286 307 Wynn Drive NW, Huntsville, AL 35805 USA | FAX: +1.236.837.3839 Senior Software Developer | Mobile: +1.919.641.2923 - 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/