From patchwork Sat Apr 14 13:22:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 152498 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 35521B7000 for ; Sat, 14 Apr 2012 20:22:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754321Ab2DNKWU (ORCPT ); Sat, 14 Apr 2012 06:22:20 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:37761 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753859Ab2DNKWR (ORCPT ); Sat, 14 Apr 2012 06:22:17 -0400 Received: by bkcik5 with SMTP id ik5so2756827bkc.19 for ; Sat, 14 Apr 2012 03:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=yTZomEZK6kb8X78M8Bpg0AP50GWq3DSi+dRAbv/SW7o=; b=w/irNq5BcflT6qZCTNu+vabDxWxAH973dG8yM26paylBOrZf4icpaAIVJkcBFpOfM1 z25z8U/fsoSaNZ98PdI9XfUc/XEL2vGKeJoDAto+xb8INPQFvCyuFYuz0IuduSQ57f5L qbmYLNLTZeKhwmctnr6L/zoG18FOr1XwCmhNLk/brytRBZqOiREE7FOdQ9u3HvB94XZU aiSYU7Mk+eVywW1719VN/cqlf2IxLI4ZXzxCB1rl/4wn2ywkhEMSYjBRXTC5IZrqZYqe WNaoPebmuEDNumhIkLHAb5JJ2EjW44Y6vDeMHH2O11exMvfWdd57JC3QHS0M83UjVXrB CEJA== Received: by 10.204.155.147 with SMTP id s19mr1406861bkw.140.1334398936065; Sat, 14 Apr 2012 03:22:16 -0700 (PDT) Received: from localhost.localdomain (95-89-78-76-dynip.superkabel.de. [95.89.78.76]) by mx.google.com with ESMTPS id z14sm20757651bky.15.2012.04.14.03.22.14 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 Apr 2012 03:22:15 -0700 (PDT) From: Sasha Levin To: wensong@linux-vs.org, horms@verge.net.au, ja@ssi.bg, kaber@trash.net, davem@davemloft.net Cc: davej@redhat.com, netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Sasha Levin Subject: [PATCH v2 2/2] netfilter: ipvs: use GFP_KERNEL allocation where possible Date: Sat, 14 Apr 2012 09:22:02 -0400 Message-Id: <1334409722-26315-2-git-send-email-levinsasha928@gmail.com> X-Mailer: git-send-email 1.7.8.5 In-Reply-To: <1334409722-26315-1-git-send-email-levinsasha928@gmail.com> References: <1334409722-26315-1-git-send-email-levinsasha928@gmail.com> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Use GFP_KERNEL instead of GFP_ATOMIC when registering an ipvs protocol. This is safe since it will always run from a process context. Signed-off-by: Sasha Levin --- net/netfilter/ipvs/ip_vs_proto.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c index 57a242d..73d06c6 100644 --- a/net/netfilter/ipvs/ip_vs_proto.c +++ b/net/netfilter/ipvs/ip_vs_proto.c @@ -71,7 +71,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;