提交 0e43785c 编写于 作者: J Johannes Weiner 提交者: Ingo Molnar

irq: use GFP_KERNEL for action allocation in request_irq()

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: NJohannes Weiner <hannes@cmpxchg.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 74296a8e
...@@ -717,7 +717,7 @@ int request_irq(unsigned int irq, irq_handler_t handler, ...@@ -717,7 +717,7 @@ int request_irq(unsigned int irq, irq_handler_t handler,
if (!handler) if (!handler)
return -EINVAL; return -EINVAL;
action = kmalloc(sizeof(struct irqaction), GFP_ATOMIC); action = kmalloc(sizeof(struct irqaction), GFP_KERNEL);
if (!action) if (!action)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册