Commit 9391d2ed authored by Sowmini Varadhan's avatar Sowmini Varadhan Committed by Luis Henriques

sparc: Use GFP_ATOMIC in ldc_alloc_exp_dring() as it can be called in softirq context

commit 0edfad59 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: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent f1fe527b
...@@ -2307,7 +2307,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len, ...@@ -2307,7 +2307,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len,
if (len & (8UL - 1)) if (len & (8UL - 1))
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
buf = kzalloc(len, GFP_KERNEL); buf = kzalloc(len, GFP_ATOMIC);
if (!buf) if (!buf)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment