Patchwork [2/2] netfilter: ipvs: use GFP_KERNEL allocation where possible

login
register
mail settings
Submitter Simon Horman
Date April 23, 2012, 12:17 p.m.
Message ID <1335183428-2585-3-git-send-email-horms@verge.net.au>
Download mbox | patch
Permalink /patch/154409/
State Rejected
Headers show

Comments

Simon Horman - April 23, 2012, 12:17 p.m.
From: Sasha Levin <levinsasha928@gmail.com>

Use GFP_KERNEL instead of GFP_ATOMIC when registering an ipvs protocol.

This is safe since it will always run from a process context.

Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 net/netfilter/ipvs/ip_vs_proto.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Greg KH - April 23, 2012, 2:23 p.m.
On Mon, Apr 23, 2012 at 09:17:08PM +0900, Simon Horman wrote:
> From: Sasha Levin <levinsasha928@gmail.com>
> 
> Use GFP_KERNEL instead of GFP_ATOMIC when registering an ipvs protocol.
> 
> This is safe since it will always run from a process context.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> Acked-by: Julian Anastasov <ja@ssi.bg>
> Signed-off-by: Simon Horman <horms@verge.net.au>
> ---
>  net/netfilter/ipvs/ip_vs_proto.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

How does this patch meet the Documentation/stable_kernel_rules.txt
requirements?

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman - April 23, 2012, 2:29 p.m.
On Mon, Apr 23, 2012 at 07:23:27AM -0700, Greg KH wrote:
> On Mon, Apr 23, 2012 at 09:17:08PM +0900, Simon Horman wrote:
> > From: Sasha Levin <levinsasha928@gmail.com>
> > 
> > Use GFP_KERNEL instead of GFP_ATOMIC when registering an ipvs protocol.
> > 
> > This is safe since it will always run from a process context.
> > 
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> > Acked-by: Julian Anastasov <ja@ssi.bg>
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> > ---
> >  net/netfilter/ipvs/ip_vs_proto.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> How does this patch meet the Documentation/stable_kernel_rules.txt
> requirements?

Sorry about that, I would like to withdraw this change from
consideration for stable.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index a62360e..307dbbb 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -68,7 +68,7 @@  register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp)
 	struct netns_ipvs *ipvs = net_ipvs(net);
 	unsigned hash = IP_VS_PROTO_HASH(pp->protocol);
 	struct ip_vs_proto_data *pd =
-			kzalloc(sizeof(struct ip_vs_proto_data), GFP_ATOMIC);
+			kzalloc(sizeof(struct ip_vs_proto_data), GFP_KERNEL);
 
 	if (!pd)
 		return -ENOMEM;