]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Tue, 21 Apr 2015 14:30:41 +0000 (10:30 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Apr 2015 20:17:06 +0000 (13:17 -0700)
Since it is possible for vnet_event_napi to end up doing
vnet_control_pkt_engine -> ... -> vnet_send_attr ->
vnet_port_alloc_tx_ring -> ldc_alloc_exp_dring -> kzalloc()
(i.e., in softirq context), kzalloc() should be called with
GFP_ATOMIC from ldc_alloc_exp_dring.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/ldc.c

index d2ae0f70059ead513bde0ff52ffa02de6615d9d8..7d3ca30fcd1506d81dfca9859ffb4cc290fae109 100644 (file)
@@ -2290,7 +2290,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len,
        if (len & (8UL - 1))
                return ERR_PTR(-EINVAL);
 
-       buf = kzalloc(len, GFP_KERNEL);
+       buf = kzalloc(len, GFP_ATOMIC);
        if (!buf)
                return ERR_PTR(-ENOMEM);