mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Chandrasekhar <chandrasekhar.nagaraj@patni.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Stack Trace dump in do_IRQ
Date: Tue, 29 Apr 2003 14:59:04 +0200	[thread overview]
Message-ID: <20030429125904.GA7949@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <NHBBIPBFKBJLCPPIPIBCCEAICAAA.chandrasekhar.nagaraj@patni.com>

On Tue, 29 April 2003 18:04:28 +0530, Chandrasekhar wrote:
> 
> We have a custom driver which runs on Red Hat Advanced Server 2.1(kernel
> version 2.4.9-e.3).
> On loading  the driver (using insmod) and running our configuration program,
> we got folowing warning message "do_IRQ: stack overflow: 1786" and along
> with the stack trace.
> 
> The configuration program, however, ran successfully.
> 
> On going through the do_IRQ code in arch/i386/kernel/irq.c we found that is
> is used for debugging check for stack overflow i.e if the stack size is less
> than 2KB free.
> There is no similar debugging check in other kernels like 2.4.7-10,2.4.18-3
> and 2.4.18-14.
> What is the significance of this debugging information and why other kernels
> dont have the same check? Also, if the stack overflow can cause future
> problems, then
> how can we increase the stack size? Thanks in advance for any information on
> this.

I don't know those kernel versions, they appear to be redhat-specific.
But current mainline kernels, both 2.4 and 2.5 have had this check for
a while already. You have to set a config option to enable them.

In principle, there is absolutely no way how linux can tell when the
check will spill over. The check in do_irq simply checks if the kernel
was close, at the time of that interrupt. This is enough to catch
dangerous code paths and fix them, before any real problems occur.

"close" for mainline kernels means, there is less than 1k of free
stack left. Your redhat kernel seems to use 2k, I even go as far as
5k, but that definitely fills my logs. 1786 is the number of bytes
still free on the stack. Should be enough for you.

If you can reproduce something as low as 1786 for a recent 2.4 or 2.5
kernel, I'd be interested in the backtrace. For 2.4.9, I just don't
care. :)

Jörn

-- 
Fantasy is more important than knowlegde. Knowlegde is limited,
while fantasy embraces the whole world.
-- Albert Einstein

  parent reply	other threads:[~2003-04-29 12:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-29 12:34 Chandrasekhar
2003-04-29 12:35 ` Christoph Hellwig
2003-04-29 12:59 ` Jörn Engel [this message]
2003-04-29 13:23 ` Alan Cox
2003-04-29 13:26 ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030429125904.GA7949@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=chandrasekhar.nagaraj@patni.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®