diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2015-04-21 10:30:41 -0400 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-07-05 10:12:57 -0400 |
commit | 967ccdcfe374504f320336787d4483f80e607fd1 (patch) | |
tree | 8fc61e936eed9a39754252a8eaa808a74d389171 /arch | |
parent | 90606a14b76f0c601238afe1274b92b44f95b0bf (diff) | |
download | linux-stable-967ccdcfe374504f320336787d4483f80e607fd1.tar.gz linux-stable-967ccdcfe374504f320336787d4483f80e607fd1.tar.bz2 linux-stable-967ccdcfe374504f320336787d4483f80e607fd1.zip |
sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context
[ Upstream commit 671d773297969bebb1732e1cdc1ec03aa53c6be2 ]
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: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/ldc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index 4310332872d4..71762565513e 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); |