netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NETFILTER]: xt_helper: Do not bypass RCU
@ 2008-01-10 15:45 Patrick McHardy
  2008-01-10 16:28 ` Jan Engelhardt
  2008-01-10 16:34 ` [NETFILTER try 2]: " Patrick McHardy
  0 siblings, 2 replies; 5+ messages in thread
From: Patrick McHardy @ 2008-01-10 15:45 UTC (permalink / raw)
  To: David S. Miller; +Cc: Netfilter Development Mailinglist

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



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

[MACVLAN]: Prevent nesting macvlan devices

Don't allow to nest macvlan devices since it will cause lockdep warnings and
isn't really useful for anything.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 80a76fbde679793a17482a3dd842386801fca66b
tree 07f67e78ac0ae505a5de81e7e770a1b7d597f120
parent 4d14fded63dcaf9d5dcf78e2a8ea3f5de2c29eb9
author Patrick McHardy <kaber@trash.net> Thu, 10 Jan 2008 16:25:01 +0100
committer Patrick McHardy <kaber@trash.net> Thu, 10 Jan 2008 16:25:01 +0100

 drivers/net/macvlan.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 2e4bcd5..e8dc2f4 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -384,6 +384,13 @@ static int macvlan_newlink(struct net_device *dev,
 	if (lowerdev == NULL)
 		return -ENODEV;
 
+	/* Don't allow macvlans on top of other macvlans - its not really
+	 * wrong, but lockdep can't handle it and its not useful for anything
+	 * you couldn't do directly on top of the real device.
+	 */
+	if (lowerdev->rtnl_link_ops == dev->rtnl_link_ops)
+		return -ENODEV;
+
 	if (!tb[IFLA_MTU])
 		dev->mtu = lowerdev->mtu;
 	else if (dev->mtu > lowerdev->mtu)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [NETFILTER]: xt_helper: Do not bypass RCU
  2008-01-10 15:45 [NETFILTER]: xt_helper: Do not bypass RCU Patrick McHardy
@ 2008-01-10 16:28 ` Jan Engelhardt
  2008-01-10 16:33   ` Patrick McHardy
  2008-01-10 16:34 ` [NETFILTER try 2]: " Patrick McHardy
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2008-01-10 16:28 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David S. Miller, Netfilter Development Mailinglist

On Jan 10 2008 16:45, Patrick McHardy wrote:

>Date: Thu, 10 Jan 2008 16:45:41 +0100
>From: Patrick McHardy <kaber@trash.net>
>To: David S. Miller <davem@davemloft.net>
>Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
>Subject: [NETFILTER]: xt_helper: Do not bypass RCU
>
>
>

Hm subject does not match the patch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [NETFILTER]: xt_helper: Do not bypass RCU
  2008-01-10 16:28 ` Jan Engelhardt
@ 2008-01-10 16:33   ` Patrick McHardy
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick McHardy @ 2008-01-10 16:33 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: David S. Miller, Netfilter Development Mailinglist

Jan Engelhardt wrote:
> On Jan 10 2008 16:45, Patrick McHardy wrote:
> 
>> Date: Thu, 10 Jan 2008 16:45:41 +0100
>> From: Patrick McHardy <kaber@trash.net>
>> To: David S. Miller <davem@davemloft.net>
>> Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
>> Subject: [NETFILTER]: xt_helper: Do not bypass RCU
>>
>>
>>
> 
> Hm subject does not match the patch.


Oops sorry, sent patches from the wrong directory. I'll resend both.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NETFILTER try 2]: xt_helper: Do not bypass RCU
  2008-01-10 15:45 [NETFILTER]: xt_helper: Do not bypass RCU Patrick McHardy
  2008-01-10 16:28 ` Jan Engelhardt
@ 2008-01-10 16:34 ` Patrick McHardy
  2008-01-11  6:41   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Patrick McHardy @ 2008-01-10 16:34 UTC (permalink / raw)
  To: David S. Miller; +Cc: Netfilter Development Mailinglist

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



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

[NETFILTER]: xt_helper: Do not bypass RCU

Use the @helper variable that was just obtained.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 30d0a14997210d0c2cbaea594eb1283d773dfca5
tree 5270a79c2e2bfd679b96edba59c6b7ef84e59bdb
parent 7bd5c38839308e24911fffa749b3e53391c7de14
author Jan Engelhardt <jengelh@computergmbh.de> Wed, 02 Jan 2008 21:29:12 +0100
committer Patrick McHardy <kaber@trash.net> Thu, 10 Jan 2008 16:44:14 +0100

 net/netfilter/xt_helper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/xt_helper.c b/net/netfilter/xt_helper.c
index 0a1f4c6..d842c4a 100644
--- a/net/netfilter/xt_helper.c
+++ b/net/netfilter/xt_helper.c
@@ -56,8 +56,8 @@ match(const struct sk_buff *skb,
 	if (info->name[0] == '\0')
 		ret = !ret;
 	else
-		ret ^= !strncmp(master_help->helper->name, info->name,
-				strlen(master_help->helper->name));
+		ret ^= !strncmp(helper->name, info->name,
+				strlen(helper->name));
 	return ret;
 }
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [NETFILTER try 2]: xt_helper: Do not bypass RCU
  2008-01-10 16:34 ` [NETFILTER try 2]: " Patrick McHardy
@ 2008-01-11  6:41   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2008-01-11  6:41 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel

From: Patrick McHardy <kaber@trash.net>
Date: Thu, 10 Jan 2008 17:34:32 +0100

> [NETFILTER]: xt_helper: Do not bypass RCU
> 
> Use the @helper variable that was just obtained.
> 
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
> Signed-off-by: Patrick McHardy <kaber@trash.net>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-11  6:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-10 15:45 [NETFILTER]: xt_helper: Do not bypass RCU Patrick McHardy
2008-01-10 16:28 ` Jan Engelhardt
2008-01-10 16:33   ` Patrick McHardy
2008-01-10 16:34 ` [NETFILTER try 2]: " Patrick McHardy
2008-01-11  6:41   ` David Miller

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).