aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/sigio_user.c
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-09-23 00:44:21 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-23 01:17:37 -0400
commit79ae2cb856ed6a8c48f455d52d5ed5960c671e67 (patch)
treeb72431f31bb99e03d86c40cbfb17e766034ac2ef /arch/um/kernel/sigio_user.c
parent46db4a42dd1190a311c2fb45106dfd0842c65a94 (diff)
[PATCH] uml: use GFP_ATOMIC for allocations under spinlocks.
setup_initial_poll is only called with sigio_lock() held, so use appropriate allocation. Also, parse_chan() can also be called when holding a spinlock (see line_open() -> parse_chan_pair()). I have sporadic problems (spinlock taken twice, with spinlock debugging on UP) which could be caused by a sequence like "take spinlock, alloc and go to sleep, take again the spinlock in the other thread". 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/kernel/sigio_user.c')
-rw-r--r--arch/um/kernel/sigio_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/kernel/sigio_user.c b/arch/um/kernel/sigio_user.c
index e89218958f38..a52751108aa1 100644
--- a/arch/um/kernel/sigio_user.c
+++ b/arch/um/kernel/sigio_user.c
@@ -340,7 +340,7 @@ static int setup_initial_poll(int fd)
340{ 340{
341 struct pollfd *p; 341 struct pollfd *p;
342 342
343 p = um_kmalloc(sizeof(struct pollfd)); 343 p = um_kmalloc_atomic(sizeof(struct pollfd));
344 if(p == NULL){ 344 if(p == NULL){
345 printk("setup_initial_poll : failed to allocate poll\n"); 345 printk("setup_initial_poll : failed to allocate poll\n");
346 return(-1); 346 return(-1);