Skip to content

Commit

Permalink
irq: use GFP_KERNEL for action allocation in request_irq()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Weiner authored and Ingo Molnar committed Feb 13, 2009
1 parent 74296a8 commit 0e43785
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0e43785

Please sign in to comment.