From: Dave Chinner <david@fromorbit.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-mm@kvack.org, xfs@oss.sgi.com,
"Ryan C. England" <ryan.england@corvidtec.com>
Subject: Re: XFS causing stack overflow
Date: Mon, 12 Dec 2011 15:36:57 +1100 [thread overview]
Message-ID: <20111212043657.GO14273@dastard> (raw)
In-Reply-To: <20111212023130.GI24062@one.firstfloor.org>
On Mon, Dec 12, 2011 at 03:31:30AM +0100, Andi Kleen wrote:
> > But that happens before do_IRQ is called, so what is the do_IRQ call
> > chain doing on this stack given that we've already supposed to have
> > switched to the interrupt stack before do_IRQ is called?
>
> Not sure I understand the question.
>
> The pt_regs are on the original stack (but they are quite small), all the rest
It's ~180 bytes, so it's not really that small.
> is on the new stack. ISTs are not used for interrupts, only for
> some special exceptions.
IST = ???
> do_IRQ doesn't switch any stacks on 64bit.
No, but it appears that it's caller does:
/* 0(%rsp): ~(interrupt number) */
.macro interrupt func
/* reserve pt_regs for scratch regs and rbp */
subq $ORIG_RAX-RBP, %rsp
CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP
SAVE_ARGS_IRQ
call \func
.endm
and the SAVE_ARGS_IRQ macro switches to the per cpu interrupt stack.
The only caller does this:
common_interrupt:
XCPT_FRAME
addq $-0x80,(%rsp) /* Adjust vector to [-256,-1] range */
interrupt do_IRQ
So, why do we get this:
Dec 6 20:27:55 localhost kernel: <IRQ> [<ffffffff81067097>] ? warn_slowpath_common+0x87/0xc0
Dec 6 20:27:55 localhost kernel: [<ffffffff8106f6da>] ? __do_softirq+0x11a/0x1d0
Dec 6 20:27:55 localhost kernel: [<ffffffff81067186>] ? warn_slowpath_fmt+0x46/0x50
Dec 6 20:27:55 localhost kernel: [<ffffffff8100c2cc>] ? call_softirq+0x1c/0x30
Dec 6 20:27:55 localhost kernel: [<ffffffff8100dfcf>] ? handle_irq+0x8f/0xa0
Dec 6 20:27:55 localhost kernel: [<ffffffff814e310c>] ? do_IRQ+0x6c/0xf0
Dec 6 20:27:55 localhost kernel: [<ffffffff8100bad3>] ? ret_from_intr+0x0/0x11
Dec 6 20:27:55 localhost kernel: <EOI> [<ffffffff8115b80f>] ? kmem_cache_free+0xbf/0x2b0
at the top of the stack frame? Is the stack unwinder walking back
across the interrupt stack to the previous task stack?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-12-12 4:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAAnfqPAm559m-Bv8LkHARm7iBW5Kfs7NmjTFidmg-idhcOq4sQ@mail.gmail.com>
2011-12-09 11:55 ` XFS causing stack overflow Christoph Hellwig
2011-12-09 15:56 ` Ryan C. England
2011-12-09 22:19 ` Dave Chinner
[not found] ` <20111209221956.GE14273__25752.826271537$1323469420$gmane$org@dastard>
2011-12-10 19:52 ` Andi Kleen
2011-12-10 22:13 ` Dave Chinner
2011-12-11 0:00 ` Andi Kleen
2011-12-11 23:05 ` Dave Chinner
2011-12-12 2:31 ` Andi Kleen
2011-12-12 4:36 ` Dave Chinner [this message]
2011-12-12 5:13 ` Andi Kleen
2011-12-12 9:00 ` Dave Chinner
2011-12-12 13:43 ` Ryan C. England
2011-12-12 22:47 ` Dave Chinner
[not found] ` <20111209115513.GA19994__23079.9863501035$1323435203$gmane$org@infradead.org>
2011-12-09 19:53 ` Andi Kleen
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=20111212043657.GO14273@dastard \
--to=david@fromorbit.com \
--cc=andi@firstfloor.org \
--cc=hch@infradead.org \
--cc=linux-mm@kvack.org \
--cc=ryan.england@corvidtec.com \
--cc=xfs@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).