mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: ooyama eiichi <ooyama@tritech.co.jp>,
	cw@f00f.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: kernel stack size
Date: Sat, 2 Apr 2005 20:37:04 +0100	[thread overview]
Message-ID: <20050402193704.GU8859@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1112468651.27149.4.camel@localhost.localdomain>

On Sat, Apr 02, 2005 at 02:04:11PM -0500, Steven Rostedt wrote:
> You can also use globally static variables too. But this makes for
> non-reentry code.
> 
> Sometimes I don't feel that a kmalloc is worth it, and if the function
> in question for the driver would seldom have problems with reentry, I
> use a statically defined global, and protect it with spin_locks. If
> these can also be used in interrupt context, you need to use the
> spin_lock_irqsave variants.  But don't do this if the critical section
> has long latencies.

... and the first time copy_from_user() blocks under your spinlock
you will get a nice shiny deadlock.

  reply	other threads:[~2005-04-02 19:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-02 17:46 ooyama eiichi
2005-04-02 17:53 ` Chris Wedgwood
2005-04-02 18:15   ` ooyama eiichi
2005-04-02 18:24     ` Chris Wedgwood
2005-04-02 18:48       ` ooyama eiichi
2005-04-02 19:04         ` Steven Rostedt
2005-04-02 19:37           ` Al Viro [this message]
2005-04-02 19:52             ` Steven Rostedt
2005-04-02 18:29     ` Brian Gerst
  -- strict thread matches above, loose matches on Subject: below --
2005-04-02 20:14 Manfred Spraul
2005-04-02 22:15 ` Steven Rostedt
2005-04-03  7:10   ` Manfred Spraul
2005-04-03 18:01     ` Steven Rostedt
2005-04-03 19:23       ` Manfred Spraul
2003-10-09 19:14 Punj, Arun

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=20050402193704.GU8859@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=cw@f00f.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ooyama@tritech.co.jp \
    --cc=rostedt@goodmis.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

Powered by JetHome