From 79ae2cb856ed6a8c48f455d52d5ed5960c671e67 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 22 Sep 2005 21:44:21 -0700 Subject: [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 Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/kernel/sigio_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/um/kernel') diff --git a/arch/um/kernel/sigio_user.c b/arch/um/kernel/sigio_user.c index e89218958f3..a52751108aa 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) { struct pollfd *p; - p = um_kmalloc(sizeof(struct pollfd)); + p = um_kmalloc_atomic(sizeof(struct pollfd)); if(p == NULL){ printk("setup_initial_poll : failed to allocate poll\n"); return(-1); -- cgit v1.2.3