Patchwork [v3,40/45] powerpc, irq: Use GFP_ATOMIC allocations in atomic context

mail settings
Submitter Srivatsa S. Bhat
Date June 27, 2013, 7:59 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/255158/
State Not Applicable
Delegated to: David Miller
Headers show


Srivatsa S. Bhat - June 27, 2013, 7:59 p.m.
The function migrate_irqs() is called with interrupts disabled
and hence its not safe to do GFP_KERNEL allocations inside it,
because they can sleep. So change the gfp mask to GFP_ATOMIC.

Cc: Benjamin Herrenschmidt <>
Cc: Michael Ellerman <>
Cc: Paul Mackerras <>
Cc: Ian Munsie <>
Cc: Steven Rostedt <>
Cc: Michael Ellerman <>
Cc: Li Zhong <>
Signed-off-by: Srivatsa S. Bhat <>

 arch/powerpc/kernel/irq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at


diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index ea185e0..ca39bac 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -412,7 +412,7 @@  void migrate_irqs(void)
 	cpumask_var_t mask;
 	const struct cpumask *map = cpu_online_mask;
-	alloc_cpumask_var(&mask, GFP_KERNEL);
+	alloc_cpumask_var(&mask, GFP_ATOMIC);
 	for_each_irq_desc(irq, desc) {
 		struct irq_data *data;