ipvs: switch to GFP_KERNEL allocations
Switch from GFP_ATOMIC allocations to GFP_KERNEL ones in ip_vs_add_service() and ip_vs_new_dest(), as we hold a mutex and are allowed to sleep in this context. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4f72816ef0
commit
dee06e4702
@ -843,7 +843,7 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dest = kzalloc(sizeof(struct ip_vs_dest), GFP_ATOMIC);
|
dest = kzalloc(sizeof(struct ip_vs_dest), GFP_KERNEL);
|
||||||
if (dest == NULL) {
|
if (dest == NULL) {
|
||||||
pr_err("%s(): no memory.\n", __func__);
|
pr_err("%s(): no memory.\n", __func__);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@ -1177,7 +1177,7 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
svc = kzalloc(sizeof(struct ip_vs_service), GFP_ATOMIC);
|
svc = kzalloc(sizeof(struct ip_vs_service), GFP_KERNEL);
|
||||||
if (svc == NULL) {
|
if (svc == NULL) {
|
||||||
IP_VS_DBG(1, "%s(): no memory\n", __func__);
|
IP_VS_DBG(1, "%s(): no memory\n", __func__);
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user