Re: your mail

Michael H. Warfield
2001-10-02T16:17:20Z

On Tue, Oct 02, 2001 at 03:29:45PM -0000, Dinesh Gandhewar wrote:

> Hello,
> 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?

You didn't say how you declared the array or what the element
size was. If the array elements were larger than a char, by saying an
array of size 2048, do you mean in bytes or in array elements?

You also didn't say where you called your module from. Was it
in an interrupt handler or at insmod time or from a system call.

If it was a automatic array on the stack (declared inside the
function and not declared static), you probably overflowed the stack.

> Thnaks,
> Dinesh

Mike
--
Michael H. Warfield | (770) 985-6132 | mhw@WittsEnd.com
(The Mad Wizard) | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!