Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a9ee813 authored by Joe Perches's avatar Joe Perches Committed by Pablo Neira Ayuso
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 40cb1f9b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -102,16 +102,15 @@ static struct sk_buff *ulog_alloc_skb(unsigned int size)
	unsigned int n;

	n = max(size, nlbufsiz);
	skb = alloc_skb(n, GFP_ATOMIC);
	skb = alloc_skb(n, GFP_ATOMIC | __GFP_NOWARN);
	if (!skb) {
		pr_debug("cannot alloc whole buffer of size %ub!\n", n);
		if (n > size) {
			/* try to allocate only as much as we need for
			 * current packet */
			skb = alloc_skb(size, GFP_ATOMIC);
			if (!skb)
				pr_debug("cannot even allocate "
					 "buffer of size %ub\n", size);
				pr_debug("cannot even allocate buffer of size %ub\n",
					 size);
		}
	}

+0 −1
Original line number Diff line number Diff line
@@ -395,7 +395,6 @@ static int clusterip_tg_check(const struct xt_tgchk_param *par)
			config = clusterip_config_init(cipinfo,
							e->ip.dst.s_addr, dev);
			if (!config) {
				pr_info("cannot allocate config\n");
				dev_put(dev);
				return -ENOMEM;
			}
+1 −3
Original line number Diff line number Diff line
@@ -135,10 +135,8 @@ static struct sk_buff *ulog_alloc_skb(unsigned int size)
	 * due to slab allocator restrictions */

	n = max(size, nlbufsiz);
	skb = alloc_skb(n, GFP_ATOMIC);
	skb = alloc_skb(n, GFP_ATOMIC | __GFP_NOWARN);
	if (!skb) {
		pr_debug("cannot alloc whole buffer %ub!\n", n);

		if (n > size) {
			/* try to allocate only as much as we need for
			 * current packet */
+2 −20
Original line number Diff line number Diff line
@@ -400,11 +400,8 @@ static unsigned char asn1_octets_decode(struct asn1_ctx *ctx,
	*len = 0;

	*octets = kmalloc(eoc - ctx->pointer, GFP_ATOMIC);
	if (*octets == NULL) {
		if (net_ratelimit())
			pr_notice("OOM in bsalg (%d)\n", __LINE__);
	if (*octets == NULL)
		return 0;
	}

	ptr = *octets;
	while (ctx->pointer < eoc) {
@@ -451,11 +448,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx,
		return 0;

	*oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
	if (*oid == NULL) {
		if (net_ratelimit())
			pr_notice("OOM in bsalg (%d)\n", __LINE__);
	if (*oid == NULL)
		return 0;
	}

	optr = *oid;

@@ -728,8 +722,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
		*obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC);
		if (*obj == NULL) {
			kfree(id);
			if (net_ratelimit())
				pr_notice("OOM in bsalg (%d)\n", __LINE__);
			return 0;
		}
		(*obj)->syntax.l[0] = l;
@@ -744,8 +736,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
		if (*obj == NULL) {
			kfree(p);
			kfree(id);
			if (net_ratelimit())
				pr_notice("OOM in bsalg (%d)\n", __LINE__);
			return 0;
		}
		memcpy((*obj)->syntax.c, p, len);
@@ -759,8 +749,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
		*obj = kmalloc(sizeof(struct snmp_object), GFP_ATOMIC);
		if (*obj == NULL) {
			kfree(id);
			if (net_ratelimit())
				pr_notice("OOM in bsalg (%d)\n", __LINE__);
			return 0;
		}
		if (!asn1_null_decode(ctx, end)) {
@@ -780,8 +768,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
		if (*obj == NULL) {
			kfree(lp);
			kfree(id);
			if (net_ratelimit())
				pr_notice("OOM in bsalg (%d)\n", __LINE__);
			return 0;
		}
		memcpy((*obj)->syntax.ul, lp, len);
@@ -801,8 +787,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
		if (*obj == NULL) {
			kfree(p);
			kfree(id);
			if (net_ratelimit())
				pr_notice("OOM in bsalg (%d)\n", __LINE__);
			return 0;
		}
		memcpy((*obj)->syntax.uc, p, len);
@@ -819,8 +803,6 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
		*obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC);
		if (*obj == NULL) {
			kfree(id);
			if (net_ratelimit())
				pr_notice("OOM in bsalg (%d)\n", __LINE__);
			return 0;
		}
		(*obj)->syntax.ul[0] = ul;
+3 −4
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ fq_find(__be32 id, u32 user, struct in6_addr *src, struct in6_addr *dst)
	return container_of(q, struct nf_ct_frag6_queue, q);

oom:
	pr_debug("Can't alloc new queue\n");
	return NULL;
}

@@ -370,10 +369,10 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev)
		struct sk_buff *clone;
		int i, plen = 0;

		if ((clone = alloc_skb(0, GFP_ATOMIC)) == NULL) {
			pr_debug("Can't alloc skb\n");
		clone = alloc_skb(0, GFP_ATOMIC);
		if (clone == NULL)
			goto out_oom;
		}

		clone->next = head->next;
		head->next = clone;
		skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list;
Loading