linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: Andrew Morton <akpm@osdl.org>
Cc: jdike@addtoit.com, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Re: [PATCH 6/9] uml: avoid malloc to sleep in atomic sections
Date: Wed, 18 Jan 2006 12:47:42 +0100	[thread overview]
Message-ID: <200601181247.42976.blaisorblade@yahoo.it> (raw)
In-Reply-To: <20060117165602.3d29f936.akpm@osdl.org>

On Wednesday 18 January 2006 01:56, Andrew Morton wrote:
> "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it> wrote:
> > +int __cant_sleep(void) {
> > +	return in_atomic() || irqs_disabled() || in_interrupt();
>
> aww, man, this is awful.  Code is supposed to know what context it's
> running in, not go fishing about in core internals trying to fix up its own
> confusion.

Yes, I know.

But is libc supposed too? That's our problem. This code is only used for calls 
to malloc() (not kmalloc()) after the kernel has booted.

There are a few calls to malloc in our code, ok, and those should be fixed 
too.

But the main problem are glibc ones (which are called from all kinds of places 
- we once got a crash because opendir() was calling malloc with big sizes - 
we solved that by optionally using vmalloc()).
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

		
___________________________________ 
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive 
http://it.messenger.yahoo.com



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2006-01-18 11:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060117235659.14622.18544.stgit@zion.home.lan>
2006-01-18  0:19 ` [uml-devel] [PATCH 1/9] uml: avoid sysfs warning on hot-unplug Paolo 'Blaisorblade' Giarrusso
2006-01-18  2:53   ` [uml-devel] " Jeff Dike
2006-01-18 11:11     ` Blaisorblade
2006-01-18  0:19 ` [uml-devel] [PATCH 2/9] uml: make daemon transport behave properly Paolo 'Blaisorblade' Giarrusso
2006-01-18  0:19 ` [uml-devel] [PATCH 3/9] uml: networking - clear transport-specific structure Paolo 'Blaisorblade' Giarrusso
2006-01-18  0:19 ` [uml-devel] [PATCH 4/9] uml: fix spinlock recursion and sleep-inside-spinlock in error path Paolo 'Blaisorblade' Giarrusso
2006-01-18  0:52   ` [uml-devel] " Andrew Morton
2006-01-18 11:44     ` Blaisorblade
2006-01-18  0:19 ` [uml-devel] [PATCH 5/9] uml: sigio code - reduce spinlock hold time Paolo 'Blaisorblade' Giarrusso
2006-01-18  0:19 ` [uml-devel] [PATCH 6/9] uml: avoid malloc to sleep in atomic sections Paolo 'Blaisorblade' Giarrusso
2006-01-18  0:56   ` [uml-devel] " Andrew Morton
2006-01-18 11:47     ` Blaisorblade [this message]
2006-01-18  0:19 ` [uml-devel] [PATCH 7/9] uml: arch Kconfig menu cleanups Paolo 'Blaisorblade' Giarrusso
2006-01-18  0:19 ` [uml-devel] [PATCH 8/9] uml: allow again to move backing file and to override saved location Paolo 'Blaisorblade' Giarrusso
2006-01-18  0:19 ` [uml-devel] [PATCH 9/9] uml ubd code: fix a bit of whitespace Paolo 'Blaisorblade' Giarrusso

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=200601181247.42976.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=akpm@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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).