[PATCH] uml: use GFP_ATOMIC for allocations under spinlocks.
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Fri, 23 Sep 2005 04:44:21 +0000 (21:44 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Sep 2005 05:17:37 +0000 (22:17 -0700)
commit79ae2cb856ed6a8c48f455d52d5ed5960c671e67
treeb72431f31bb99e03d86c40cbfb17e766034ac2ef
parent46db4a42dd1190a311c2fb45106dfd0842c65a94
[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>
arch/um/drivers/chan_kern.c
arch/um/kernel/sigio_user.c