mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: mfbaustx <mfbaustx@gmail.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [im]proper use of stack?
Date: Thu, 19 Oct 2006 11:23:11 -0500	[thread overview]
Message-ID: <op.thofmaaanwjy9v@titan.bintz-dev.net> (raw)

So... I know that there is some small-ish amount of kernel stack space  
available per-process, and the kernel uses this area when executing on a  
process's behalf (system call, etc).  Let's say I allocate (via an  
automatic/stack-based storage) some smallish structure which I want a  
kernel thread to populate (or interrupt context... some context other than  
my process's context).

If my process gets context swapped, is my kernel-based stack pointer  
always valid?

Why use stack-based storage, you ask?  Let's pretend this is a  
high-frequency call and I don't want to incur the expense of kmalloc'ing  
and freeing on every call.  I know I have enough stack space, I just don't  
know if my stack is always available  :)

TIA!

             reply	other threads:[~2006-10-19 16:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19 16:23 mfbaustx [this message]
2006-10-19 22:22 ` Alan Cox

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=op.thofmaaanwjy9v@titan.bintz-dev.net \
    --to=mfbaustx@gmail.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®