irq: use GFP_KERNEL for action allocation in request_irq()
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 13 Feb 2009 03:38:04 +0000 (04:38 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 13 Feb 2009 09:52:07 +0000 (10:52 +0100)
request_irq() calls into proc code via __setup_irq() which is not safe
in an atomic context, so request_irq() can itself use the more
reliable GFP_KERNEL allocation for the action descriptor.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/irq/manage.c

index cd0cd8d..1c50550 100644 (file)
@@ -717,7 +717,7 @@ int request_irq(unsigned int irq, irq_handler_t handler,
        if (!handler)
                return -EINVAL;
 
-       action = kmalloc(sizeof(struct irqaction), GFP_ATOMIC);
+       action = kmalloc(sizeof(struct irqaction), GFP_KERNEL);
        if (!action)
                return -ENOMEM;