From: Stephen Hemminger <shemminger@vyatta.com>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 1/2] netfilter: change NF_ASSERT to WARN_ON
Date: Wed, 12 May 2010 09:29:55 -0700 [thread overview]
Message-ID: <20100512163030.036777790@vyatta.com> (raw)
In-Reply-To: 20100512162954.316178344@vyatta.com
[-- Attachment #1: netfilter-assert.patch --]
[-- Type: text/plain, Size: 1678 bytes --]
Change netfilter asserts to standard WARN_ON. This has the
benefit of backtrace info and also causes netfilter errors
to show up on kerneloops.org.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/ipv4/netfilter/ip_tables.c 2010-05-11 21:08:46.929331436 -0700
+++ b/net/ipv4/netfilter/ip_tables.c 2010-05-12 08:27:47.444262585 -0700
@@ -51,12 +51,7 @@ MODULE_DESCRIPTION("IPv4 packet filter")
#endif
#ifdef CONFIG_NETFILTER_DEBUG
-#define IP_NF_ASSERT(x) \
-do { \
- if (!(x)) \
- printk("IP_NF_ASSERT: %s:%s:%u\n", \
- __func__, __FILE__, __LINE__); \
-} while(0)
+#define IP_NF_ASSERT(x) WARN_ON(!(x))
#else
#define IP_NF_ASSERT(x)
#endif
--- a/net/ipv4/netfilter/arp_tables.c 2010-05-11 21:08:47.259329948 -0700
+++ b/net/ipv4/netfilter/arp_tables.c 2010-05-12 08:27:47.514379906 -0700
@@ -49,12 +49,7 @@ MODULE_DESCRIPTION("arptables core");
#endif
#ifdef CONFIG_NETFILTER_DEBUG
-#define ARP_NF_ASSERT(x) \
-do { \
- if (!(x)) \
- printk("ARP_NF_ASSERT: %s:%s:%u\n", \
- __func__, __FILE__, __LINE__); \
-} while(0)
+#define ARP_NF_ASSERT(x) WARN_ON(!(x))
#else
#define ARP_NF_ASSERT(x)
#endif
--- a/net/ipv6/netfilter/ip6_tables.c 2010-05-11 21:08:35.787720711 -0700
+++ b/net/ipv6/netfilter/ip6_tables.c 2010-05-12 08:27:47.384369744 -0700
@@ -52,12 +52,7 @@ MODULE_DESCRIPTION("IPv6 packet filter")
#endif
#ifdef CONFIG_NETFILTER_DEBUG
-#define IP_NF_ASSERT(x) \
-do { \
- if (!(x)) \
- printk("IP_NF_ASSERT: %s:%s:%u\n", \
- __func__, __FILE__, __LINE__); \
-} while(0)
+#define IP_NF_ASSERT(x) WARN_ON(!(x))
#else
#define IP_NF_ASSERT(x)
#endif
next parent reply other threads:[~2010-05-12 16:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100512162954.316178344@vyatta.com>
2010-05-12 16:29 ` Stephen Hemminger [this message]
2010-05-13 13:01 ` [PATCH 1/2] netfilter: change NF_ASSERT to WARN_ON Patrick McHardy
2010-05-12 16:29 ` [PATCH 2/2] netfilter: cleanup printk messages Stephen Hemminger
2010-05-12 16:52 ` Jan Engelhardt
2010-05-12 16:54 ` Stephen Hemminger
2010-05-13 13:03 ` Patrick McHardy
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=20100512163030.036777790@vyatta.com \
--to=shemminger@vyatta.com \
--cc=kaber@trash.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).