From: Sowmini Varadhan Date: Tue, 21 Apr 2015 14:30:41 +0000 (-0400) Subject: sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context X-Git-Tag: Ubuntu-5.2.0-15.16~11474^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=0edfad5959df7379c9e554fbe8ba264ae232d321;p=mirror_ubuntu-eoan-kernel.git 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 Signed-off-by: David S. Miller --- 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);