Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Simon Horman and committed by
David S. Miller
dee06e47 4f72816e

+2 -2
+2 -2
net/netfilter/ipvs/ip_vs_ctl.c
··· 843 843 return -EINVAL; 844 844 } 845 845 846 - dest = kzalloc(sizeof(struct ip_vs_dest), GFP_ATOMIC); 846 + dest = kzalloc(sizeof(struct ip_vs_dest), GFP_KERNEL); 847 847 if (dest == NULL) { 848 848 pr_err("%s(): no memory.\n", __func__); 849 849 return -ENOMEM; ··· 1177 1177 } 1178 1178 #endif 1179 1179 1180 - svc = kzalloc(sizeof(struct ip_vs_service), GFP_ATOMIC); 1180 + svc = kzalloc(sizeof(struct ip_vs_service), GFP_KERNEL); 1181 1181 if (svc == NULL) { 1182 1182 IP_VS_DBG(1, "%s(): no memory\n", __func__); 1183 1183 ret = -ENOMEM;