summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ldc.c
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2015-04-21 16:30:41 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-21 22:17:06 +0200
commit0edfad5959df7379c9e554fbe8ba264ae232d321 (patch)
treebc1638f073f782b9855e7d11421a42583adfe171 /arch/sparc/kernel/ldc.c
parentsparc64: Use M7 PMC write on all chips T4 and onward. (diff)
downloadlinux-0edfad5959df7379c9e554fbe8ba264ae232d321.tar.xz
linux-0edfad5959df7379c9e554fbe8ba264ae232d321.zip
sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context
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>
Diffstat (limited to 'arch/sparc/kernel/ldc.c')
-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 d2ae0f70059e..7d3ca30fcd15 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -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);