lkml.org 
[lkml]   [2001]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: Untitled
    Date
    > 
    > > 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?
    > > Thnaks,
    > > Dinesh
    >
    > Hmm. Perhaps there's is a bug in your module.
    >
    > --
    > Thomas Hood
    > (Don't reply to the From: address but to jdthood_AT_yahoo.co.uk)


    More likely he's causing a kernel stack overflow. If it's a local variable
    it's going to be either 4k or 8k (int or long) and the kernel stack is only
    8k on intel. Try making it a static array outside of any function.

    Jeff Voskamp
    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:03    [W:10.935 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site