aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-29 17:17:25 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2011-11-01 04:19:49 -0400
commit0a9ee81349d90c6c85831f38118bf569c60a4d51 (patch)
tree37c5f232e594cbd222637c8ae44030749467190d
parent40cb1f9bc52186a1a9ef56f0d976482863516ce1 (diff)
netfilter: Remove unnecessary OOM logging messages
Site specific OOM messages are duplications of a generic MM out of memory message and aren't really useful, so just delete them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--net/bridge/netfilter/ebt_ulog.c7
-rw-r--r--net/ipv4/netfilter/ipt_CLUSTERIP.c1
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_snmp_basic.c22
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c7
-rw-r--r--net/netfilter/ipset/ip_set_core.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_core.c5
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c18
-rw-r--r--net/netfilter/ipvs/ip_vs_dh.c5
-rw-r--r--net/netfilter/ipvs/ip_vs_lblc.c9
-rw-r--r--net/netfilter/ipvs/ip_vs_lblcr.c13
-rw-r--r--net/netfilter/ipvs/ip_vs_proto.c5
-rw-r--r--net/netfilter/ipvs/ip_vs_sh.c5
-rw-r--r--net/netfilter/ipvs/ip_vs_wrr.c5
-rw-r--r--net/netfilter/nf_conntrack_core.c5
-rw-r--r--net/netfilter/nfnetlink_log.c7
-rw-r--r--net/netfilter/xt_IDLETIMER.c2
-rw-r--r--net/netfilter/xt_hashlimit.c5
18 files changed, 37 insertions, 92 deletions
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index bf2a333ca7c7..5449294bdd5e 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -102,16 +102,15 @@ static struct sk_buff *ulog_alloc_skb(unsigned int size)
102 unsigned int n; 102 unsigned int n;
103 103
104 n = max(size, nlbufsiz); 104 n = max(size, nlbufsiz);
105 skb = alloc_skb(n, GFP_ATOMIC); 105 skb = alloc_skb(n, GFP_ATOMIC | __GFP_NOWARN);
106 if (!skb) { 106 if (!skb) {
107 pr_debug("cannot alloc whole buffer of size %ub!\n", n);
108 if (n > size) { 107 if (n > size) {
109 /* try to allocate only as much as we need for 108 /* try to allocate only as much as we need for
110 * current packet */ 109 * current packet */
111 skb = alloc_skb(size, GFP_ATOMIC); 110 skb = alloc_skb(size, GFP_ATOMIC);
112 if (!skb) 111 if (!skb)
113 pr_debug("cannot even allocate " 112 pr_debug("cannot even allocate buffer of size %ub\n",
114 "buffer of size %ub\n", size); 113 size);
115 } 114 }
116 } 115 }
117 116
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index db8d22db425f..a639967eb727 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -395,7 +395,6 @@ static int clusterip_tg_check(const struct xt_tgchk_param *par)
395 config = clusterip_config_init(cipinfo, 395 config = clusterip_config_init(cipinfo,
396 e->ip.dst.s_addr, dev); 396 e->ip.dst.s_addr, dev);
397 if (!config) { 397 if (!config) {
398 pr_info("cannot allocate config\n");
399 dev_put(dev); 398 dev_put(dev);
400 return -ENOMEM; 399 return -ENOMEM;
401 } 400 }
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index 446e0f467a17..b5508151e547 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -135,10 +135,8 @@ static struct sk_buff *ulog_alloc_skb(unsigned int size)
135 * due to slab allocator restrictions */ 135 * due to slab allocator restrictions */
136 136
137 n = max(size, nlbufsiz); 137 n = max(size, nlbufsiz);
138 skb = alloc_skb(n, GFP_ATOMIC); 138 skb = alloc_skb(n, GFP_ATOMIC | __GFP_NOWARN);
139 if (!skb) { 139 if (!skb) {
140 pr_debug("cannot alloc whole buffer %ub!\n", n);
141
142 if (n > size) { 140 if (n > size) {
143 /* try to allocate only as much as we need for 141 /* try to allocate only as much as we need for
144 * current packet */ 142 * current packet */
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index d1cb412c18e0..2133c30a4a5f 100644
--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -400,11 +400,8 @@ static unsigned char asn1_octets_decode(struct asn1_ctx *ctx,
400 *len = 0; 400 *len = 0;
401 401
402 *octets = kmalloc(eoc - ctx->pointer, GFP_ATOMIC); 402 *octets = kmalloc(eoc - ctx->pointer, GFP_ATOMIC);
403 if (*octets == NULL) { 403 if (*octets == NULL)
404 if (net_ratelimit())
405 pr_notice("OOM in bsalg (%d)\n", __LINE__);
406 return 0; 404 return 0;
407 }
408 405
409 ptr = *octets; 406 ptr = *octets;
410 while (ctx->pointer < eoc) { 407 while (ctx->pointer < eoc) {
@@ -451,11 +448,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx,
451 return 0; 448 return 0;
452 449
453 *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); 450 *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
454 if (*oid == NULL) { 451 if (*oid == NULL)
455 if (net_ratelimit())
456 pr_notice("OOM in bsalg (%d)\n", __LINE__);
457 return 0; 452 return 0;
458 }
459 453
460 optr = *oid; 454 optr = *oid;
461 455
@@ -728,8 +722,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
728 *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); 722 *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC);
729 if (*obj == NULL) { 723 if (*obj == NULL) {
730 kfree(id); 724 kfree(id);
731 if (net_ratelimit())
732 pr_notice("OOM in bsalg (%d)\n", __LINE__);
733 return 0; 725 return 0;
734 } 726 }
735 (*obj)->syntax.l[0] = l; 727 (*obj)->syntax.l[0] = l;
@@ -744,8 +736,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
744 if (*obj == NULL) { 736 if (*obj == NULL) {
745 kfree(p); 737 kfree(p);
746 kfree(id); 738 kfree(id);
747 if (net_ratelimit())
748 pr_notice("OOM in bsalg (%d)\n", __LINE__);
749 return 0; 739 return 0;
750 } 740 }
751 memcpy((*obj)->syntax.c, p, len); 741 memcpy((*obj)->syntax.c, p, len);
@@ -759,8 +749,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
759 *obj = kmalloc(sizeof(struct snmp_object), GFP_ATOMIC); 749 *obj = kmalloc(sizeof(struct snmp_object), GFP_ATOMIC);
760 if (*obj == NULL) { 750 if (*obj == NULL) {
761 kfree(id); 751 kfree(id);
762 if (net_ratelimit())
763 pr_notice("OOM in bsalg (%d)\n", __LINE__);
764 return 0; 752 return 0;
765 } 753 }
766 if (!asn1_null_decode(ctx, end)) { 754 if (!asn1_null_decode(ctx, end)) {
@@ -780,8 +768,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
780 if (*obj == NULL) { 768 if (*obj == NULL) {
781 kfree(lp); 769 kfree(lp);
782 kfree(id); 770 kfree(id);
783 if (net_ratelimit())
784 pr_notice("OOM in bsalg (%d)\n", __LINE__);
785 return 0; 771 return 0;
786 } 772 }
787 memcpy((*obj)->syntax.ul, lp, len); 773 memcpy((*obj)->syntax.ul, lp, len);
@@ -801,8 +787,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
801 if (*obj == NULL) { 787 if (*obj == NULL) {
802 kfree(p); 788 kfree(p);
803 kfree(id); 789 kfree(id);
804 if (net_ratelimit())
805 pr_notice("OOM in bsalg (%d)\n", __LINE__);
806 return 0; 790 return 0;
807 } 791 }
808 memcpy((*obj)->syntax.uc, p, len); 792 memcpy((*obj)->syntax.uc, p, len);
@@ -819,8 +803,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
819 *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); 803 *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC);
820 if (*obj == NULL) { 804 if (*obj == NULL) {
821 kfree(id); 805 kfree(id);
822 if (net_ratelimit())
823 pr_notice("OOM in bsalg (%d)\n", __LINE__);
824 return 0;