Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	Netfilter Development Mailinglist
	<netfilter-devel@vger.kernel.org>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH net-next-2.6] ipvs: switch to GFP_KERNEL allocations
Date: Tue, 24 Aug 2010 15:00:42 +0900	[thread overview]
Message-ID: <20100824060039.GB21033@verge.net.au> (raw)
In-Reply-To: <1282629098.2378.1521.camel@edumazet-laptop>

On Tue, Aug 24, 2010 at 07:51:38AM +0200, Eric Dumazet wrote:
> 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

Patrick, please consider this for nf-next.

> ---
>  net/netfilter/ipvs/ip_vs_ctl.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
> index 0f0c079..896f34b 100644
> --- a/net/netfilter/ipvs/ip_vs_ctl.c
> +++ b/net/netfilter/ipvs/ip_vs_ctl.c
> @@ -843,7 +843,7 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest,
>  			return -EINVAL;
>  	}
>  
> -	dest = kzalloc(sizeof(struct ip_vs_dest), GFP_ATOMIC);
> +	dest = kzalloc(sizeof(struct ip_vs_dest), GFP_KERNEL);
>  	if (dest == NULL) {
>  		pr_err("%s(): no memory.\n", __func__);
>  		return -ENOMEM;
> @@ -1177,7 +1177,7 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
>  	}
>  #endif
>  
> -	svc = kzalloc(sizeof(struct ip_vs_service), GFP_ATOMIC);
> +	svc = kzalloc(sizeof(struct ip_vs_service), GFP_KERNEL);
>  	if (svc == NULL) {
>  		IP_VS_DBG(1, "%s(): no memory\n", __func__);
>  		ret = -ENOMEM;
> 

      reply	other threads:[~2010-08-24  6:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24  5:51 [PATCH net-next-2.6] ipvs: switch to GFP_KERNEL allocations Eric Dumazet
2010-08-24  6:00 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100824060039.GB21033@verge.net.au \
    --to=horms@verge.net.au \
    --cc=eric.dumazet@gmail.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox