On Wednesday 18 January 2006 01:56, Andrew Morton wrote:
> "Paolo 'Blaisorblade' Giarrusso" <[EMAIL PROTECTED]> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel