All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Netfilter Development Mailinglist
	<netfilter-devel@vger.kernel.org>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: netfilter: xt_limit: fix invalid return code in limit_mt_check()
Date: Mon, 23 Nov 2009 13:43:57 +0100	[thread overview]
Message-ID: <4B0A838D.3020907@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

This patch fixes an invalid return value in the limit match.
Please apply or pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.git master

Thanks!

[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 805 bytes --]

commit 8fa539bd911e8a7faa7cd77b5192229c9666d9b8
Author: Patrick McHardy <kaber@trash.net>
Date:   Mon Nov 23 13:37:23 2009 +0100

    netfilter: xt_limit: fix invalid return code in limit_mt_check()
    
    Commit acc738fe (netfilter: xtables: avoid pointer to self) introduced
    an invalid return value in limit_mt_check().
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c
index 2e8089e..2773be6 100644
--- a/net/netfilter/xt_limit.c
+++ b/net/netfilter/xt_limit.c
@@ -112,7 +112,7 @@ static bool limit_mt_check(const struct xt_mtchk_param *par)
 
 	priv = kmalloc(sizeof(*priv), GFP_KERNEL);
 	if (priv == NULL)
-		return -ENOMEM;
+		return false;
 
 	/* For SMP, we only want to use one set of state. */
 	r->master = priv;

             reply	other threads:[~2009-11-23 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23 12:43 Patrick McHardy [this message]
2009-11-23 17:53 ` netfilter: xt_limit: fix invalid return code in limit_mt_check() David Miller

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=4B0A838D.3020907@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.