diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-01-18 20:42:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 22:20:21 -0500 |
commit | b63162939cd797c8269964ce856ed1f2fec5f70e (patch) | |
tree | 666dd2919bd156aa183a87576224d0fad3c4cf72 /arch/um/include/kern_util.h | |
parent | b6a2b13778873bd9edd0b4a7d24a7bd730369021 (diff) |
[PATCH] uml: avoid malloc to sleep in atomic sections
Ugly trick to help make malloc not sleeping - we can't do anything else. But
this is not yet optimal, since spinlock don't trigger in_atomic() when
preemption is disabled.
Also, even if ugly, this was already used in one place, and was even more
bogus. Fix it.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/include/kern_util.h')
-rw-r--r-- | arch/um/include/kern_util.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index 8f4e46d677ab..c649108a9e9f 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -120,8 +120,10 @@ extern void machine_halt(void); | |||
120 | extern int is_syscall(unsigned long addr); | 120 | extern int is_syscall(unsigned long addr); |
121 | extern void arch_switch(void); | 121 | extern void arch_switch(void); |
122 | extern void free_irq(unsigned int, void *); | 122 | extern void free_irq(unsigned int, void *); |
123 | extern int um_in_interrupt(void); | ||
124 | extern int cpu(void); | 123 | extern int cpu(void); |
124 | |||
125 | /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ | ||
126 | extern int __cant_sleep(void); | ||
125 | extern void segv_handler(int sig, union uml_pt_regs *regs); | 127 | extern void segv_handler(int sig, union uml_pt_regs *regs); |
126 | extern void sigio_handler(int sig, union uml_pt_regs *regs); | 128 | extern void sigio_handler(int sig, union uml_pt_regs *regs); |
127 | 129 | ||