summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2015-04-21 10:30:41 -0400
committerJiri Slaby <jslaby@suse.cz>2015-07-30 14:10:36 +0200
commit6b4086dc645491f3df0f5bc7b49cf9dccd827801 (patch)
treed993ae3ffa3fd37344b5a57664901e722391ed8f /arch
parentbee6cd85e93d34534a0908ba4ba7502194b998ca (diff)
sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context
commit 0edfad5959df7379c9e554fbe8ba264ae232d321 upstream. 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> Signed-off-by: Jiri Slaby <jslaby@suse.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/ldc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index 27bb55485472..7ef28625c199 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -2307,7 +2307,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);