r3411 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches patches/series
Simon Horman
horms@costa.debian.org
Thu, 30 Jun 2005 06:12:45 +0000
Author: horms
Date: 2005-06-30 06:12:44 +0000 (Thu, 30 Jun 2005)
New Revision: 3411
Added:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-1.dpatch
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-2.dpatch
Removed:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops.dpatch
Modified:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-17
Log:
2.6.8 doesn't have rcu_dereference
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2005-06-30 04:31:37 UTC (rev 3410)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2005-06-30 06:12:44 UTC (rev 3411)
@@ -82,7 +82,7 @@
heavy load.
(Simon Horman)
- * net-bridge-mangle-oops.dpatch
+ * net-bridge-mangle-oops-1.dpatch, net-bridge-mangle-oops-2.dpatch
Fix oops when mangling and brouting and tcpdumping packets
Needed for net-bridge-forwarding-poison.dpatch
(Simon Horman)
@@ -110,7 +110,7 @@
* net-ipv4-ipvs-conn_tab-race.dpatch
Fix race condition on p_vs_conn_tab list modification
- -- Simon Horman <horms@debian.org> Thu, 30 Jun 2005 13:30:50 +0900
+ -- Simon Horman <horms@debian.org> Thu, 30 Jun 2005 15:11:25 +0900
kernel-source-2.6.8 (2.6.8-16) unstable; urgency=low
Copied: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-1.dpatch (from rev 3409, trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops.dpatch)
Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-2.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-2.dpatch 2005-06-30 04:31:37 UTC (rev 3410)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-2.dpatch 2005-06-30 06:12:44 UTC (rev 3411)
@@ -0,0 +1,23 @@
+# origin: Horms <horms@debian.org>
+# inclusion: backport for 2.6.8 not appropriate for upstream
+# descrition: 2.6.8 doesn't have rcu_dereference()
+# revision date: Thu, 30 Jun 2005 15:09:58 +0900
+#
+# Signed-off-by: Horms <horms@debian.org>
+#
+--- a/net/core/dev.c.orig 2005-06-30 15:04:16.000000000 +0900
++++ b/net/core/dev.c 2005-06-30 15:07:24.000000000 +0900
+@@ -1691,8 +1691,11 @@
+ {
+ struct net_bridge_port *port;
+
+- if ((*pskb)->pkt_type == PACKET_LOOPBACK ||
+- (port = rcu_dereference((*pskb)->dev->br_port)) == NULL)
++ if ((*pskb)->pkt_type == PACKET_LOOPBACK)
++ return 0;
++
++ smp_read_barrier_depends();
++ if ((port = (*pskb)->dev->br_port) == NULL)
+ return 0;
+
+ if (*pt_prev) {
Deleted: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops.dpatch 2005-06-30 04:31:37 UTC (rev 3410)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops.dpatch 2005-06-30 06:12:44 UTC (rev 3411)
@@ -1,298 +0,0 @@
-# origin: shemminger (BitKeeper)
-# cset: 1.1832.2.15 (2.6) key=412d2246sXjFQD6OadAB57YWvqR9vQ
-# URL: http://linux.bkbits.net:8080/linux-2.6/cset@412d2246sXjFQD6OadAB57YWvqR9vQ
-# inclusion: upstream
-# descrition: [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets
-# revision date: Tue, 28 Jun 2005 19:49:12 +0900
-#
-# S rset: ChangeSet|1.1832.2.14..1.1832.2.15
-# I rset: net/bridge/br_private.h|1.34..1.35
-# R rset: net/bridge/br_input.c|1.19..1.20
-# I rset: include/linux/if_bridge.h|1.7..1.8
-# R rset: net/core/dev.c|1.160..1.161
-#
-# Key:
-# S: Skipped ChangeSet file only
-# O: Original Followed by Updated
-# U: Updated Included with updated range of versions
-# I: Included Included verbatim
-# E: Excluded Excluded on request from user
-# D: Deleted Manually deleted by subsequent user edit
-# R: Revised Manually revised by subsequent user edit
-#
-#
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# net/core/dev.c
-# 2004/08/25 16:35:17-07:00 shemminger@osdl.org +16 -25
-# [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets
-#
-# The ebtables brouting chain, traversed through the call
-# br_should_route_hook(), can alter a packet. The redirect target
-# does this, f.e., to change the MAC destination.
-#
-# Bart discovered this and proposed a patch; this is a revised version.
-# This version cleans up the handle_bridge code in net/core/dev.c as well
-# as getting rid of extra rcu_read_lock and only does the br_port checking
-# once.
-#
-# Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
-# Signed-off-by: David S. Miller <davem@redhat.com>
-#
-# ChangeSet
-# 2004/08/25 16:35:34-07:00 shemminger@osdl.org
-# [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets
-#
-# The ebtables brouting chain, traversed through the call
-# br_should_route_hook(), can alter a packet. The redirect target
-# does this, f.e., to change the MAC destination.
-#
-# Bart discovered this and proposed a patch; this is a revised version.
-# This version cleans up the handle_bridge code in net/core/dev.c as well
-# as getting rid of extra rcu_read_lock and only does the br_port checking
-# once.
-#
-# Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
-# Signed-off-by: David S. Miller <davem@redhat.com>
-#
-# net/bridge/br_private.h
-# 2004/08/25 16:35:17-07:00 shemminger@osdl.org +1 -1
-# [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets
-#
-# The ebtables brouting chain, traversed through the call
-# br_should_route_hook(), can alter a packet. The redirect target
-# does this, f.e., to change the MAC destination.
-#
-# Bart discovered this and proposed a patch; this is a revised version.
-# This version cleans up the handle_bridge code in net/core/dev.c as well
-# as getting rid of extra rcu_read_lock and only does the br_port checking
-# once.
-#
-# Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
-# Signed-off-by: David S. Miller <davem@redhat.com>
-#
-# net/bridge/br_input.c
-# 2004/08/25 16:35:17-07:00 shemminger@osdl.org +23 -34
-# [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets
-#
-# The ebtables brouting chain, traversed through the call
-# br_should_route_hook(), can alter a packet. The redirect target
-# does this, f.e., to change the MAC destination.
-#
-# Bart discovered this and proposed a patch; this is a revised version.
-# This version cleans up the handle_bridge code in net/core/dev.c as well
-# as getting rid of extra rcu_read_lock and only does the br_port checking
-# once.
-#
-# Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
-# Signed-off-by: David S. Miller <davem@redhat.com>
-#
-# include/linux/if_bridge.h
-# 2004/08/25 16:35:17-07:00 shemminger@osdl.org +1 -1
-# [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets
-#
-# The ebtables brouting chain, traversed through the call
-# br_should_route_hook(), can alter a packet. The redirect target
-# does this, f.e., to change the MAC destination.
-#
-# Bart discovered this and proposed a patch; this is a revised version.
-# This version cleans up the handle_bridge code in net/core/dev.c as well
-# as getting rid of extra rcu_read_lock and only does the br_port checking
-# once.
-#
-# Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
-# Signed-off-by: David S. Miller <davem@redhat.com>
-#
-#
-===== net/bridge/br_private.h 1.34 vs 1.35 =====
---- 1.34/net/bridge/br_private.h 2004-08-03 08:54:45 +09:00
-+++ 1.35/net/bridge/br_private.h 2004-08-26 08:35:17 +09:00
-@@ -177,7 +177,7 @@ extern int br_min_mtu(const struct net_b
-
- /* br_input.c */
- extern int br_handle_frame_finish(struct sk_buff *skb);
--extern int br_handle_frame(struct sk_buff *skb);
-+extern int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb);
-
- /* br_ioctl.c */
- extern int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-===== net/bridge/br_input.c 1.19 vs 1.20 =====
---- 1.19/net/bridge/br_input.c 2004-08-23 17:15:14 +09:00
-+++ 1.20/net/bridge/br_input.c 2004-08-26 08:35:17 +09:00
-@@ -45,27 +45,15 @@
- br_pass_frame_up_finish);
- }
-
-+/* note: already called with rcu_read_lock (preempt_disabled) */
- int br_handle_frame_finish(struct sk_buff *skb)
- {
-- struct net_bridge *br;
-- unsigned char *dest;
-+ const unsigned char *dest = skb->mac.ethernet->h_dest;
-+ struct net_bridge_port *p = skb->dev->br_port;
-+ struct net_bridge *br = p->br;
- struct net_bridge_fdb_entry *dst;
-- struct net_bridge_port *p;
-- int passedup;
--
-- dest = skb->mac.ethernet->h_dest;
--
-- rcu_read_lock();
-- p = skb->dev->br_port;
-- smp_read_barrier_depends();
--
-- if (p == NULL || p->state == BR_STATE_DISABLED) {
-- kfree_skb(skb);
-- goto out;
-- }
-+ int passedup = 0;
-
-- br = p->br;
-- passedup = 0;
- if (br->dev->flags & IFF_PROMISC) {
- struct sk_buff *skb2;
-
-@@ -99,20 +88,21 @@ int br_handle_frame_finish(struct sk_buf
- br_flood_forward(br, skb, 0);
-
- out:
-- rcu_read_unlock();
- return 0;
- }
-
--int br_handle_frame(struct sk_buff *skb)
-+/*
-+ * Called via br_handle_frame_hook.
-+ * Return 0 if *pskb should be processed furthur
-+ * 1 if *pskb is handled
-+ * note: already called with rcu_read_lock (preempt_disabled)
-+ */
-+int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb)
- {
-- unsigned char *dest;
-- struct net_bridge_port *p;
--
-- dest = skb->mac.ethernet->h_dest;
-+ struct sk_buff *skb = *pskb;
-+ const unsigned char *dest = skb->mac.ethernet->h_dest;
-
-- rcu_read_lock();
-- p = skb->dev->br_port;
-- if (p == NULL || p->state == BR_STATE_DISABLED)
-+ if (p->state == BR_STATE_DISABLED)
- goto err;
-
- if (skb->mac.ethernet->h_source[0] & 1)
-@@ -128,15 +118,16 @@ int br_handle_frame(struct sk_buff *skb)
- if (!dest[5]) {
- NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
- NULL, br_stp_handle_bpdu);
-- rcu_read_unlock();
-- return 0;
-+ return 1;
- }
- }
-
- else if (p->state == BR_STATE_FORWARDING) {
-- if (br_should_route_hook && br_should_route_hook(&skb)) {
-- rcu_read_unlock();
-- return -1;
-+ if (br_should_route_hook) {
-+ if (br_should_route_hook(pskb))
-+ return 0;
-+ skb = *pskb;
-+ dest = skb->mac.ethernet->h_dest;
- }
-
- if (!memcmp(p->br->dev->dev_addr, dest, ETH_ALEN))
-@@ -144,12 +135,10 @@ int br_handle_frame(struct sk_buff *skb)
-
- NF_HOOK(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL,
- br_handle_frame_finish);
-- rcu_read_unlock();
-- return 0;
-+ return 1;
- }
-
- err:
-- rcu_read_unlock();
- kfree_skb(skb);
-- return 0;
-+ return 1;
- }
-===== include/linux/if_bridge.h 1.7 vs 1.8 =====
---- 1.7/include/linux/if_bridge.h 2004-06-04 09:20:24 +09:00
-+++ 1.8/include/linux/if_bridge.h 2004-08-26 08:35:17 +09:00
-@@ -105,7 +105,7 @@ struct __fdb_entry
- #include <linux/netdevice.h>
-
- extern void brioctl_set(int (*ioctl_hook)(unsigned int, void __user *));
--extern int (*br_handle_frame_hook)(struct sk_buff *skb);
-+extern int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb);
- extern int (*br_should_route_hook)(struct sk_buff **pskb);
-
- #endif
-===== net/core/dev.c 1.160 vs 1.161 =====
---- 1.160/net/core/dev.c 2004-08-25 09:09:48 +09:00
-+++ 1.161/net/core/dev.c 2004-08-26 08:35:17 +09:00
-@@ -1683,36 +1683,29 @@
- return pt_prev->func(skb, skb->dev, pt_prev);
- }
-
--
- #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE)
--int (*br_handle_frame_hook)(struct sk_buff *skb);
-+int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb);
-
--static __inline__ int handle_bridge(struct sk_buff *skb,
-- struct packet_type *pt_prev)
-+static __inline__ int handle_bridge(struct sk_buff **pskb,
-+ struct packet_type **pt_prev, int *ret)
- {
-- int ret = NET_RX_DROP;
-- if (pt_prev)
-- ret = deliver_skb(skb, pt_prev, 0);
--
-- return ret;
--}
--
--#endif
-+ struct net_bridge_port *port;
-
--static inline int __handle_bridge(struct sk_buff *skb,
-- struct packet_type **pt_prev, int *ret)
--{
--#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
-- if (skb->dev->br_port && skb->pkt_type != PACKET_LOOPBACK) {
-- *ret = handle_bridge(skb, *pt_prev);
-- if (br_handle_frame_hook(skb) == 0)
-- return 1;
-+ if ((*pskb)->pkt_type == PACKET_LOOPBACK ||
-+ (port = rcu_dereference((*pskb)->dev->br_port)) == NULL)
-+ return 0;
-
-+ if (*pt_prev) {
-+ *ret = deliver_skb(*pskb, *pt_prev);
- *pt_prev = NULL;
- }
--#endif
-- return 0;
-+
-+ return br_handle_frame_hook(port, pskb);
- }
-+#else
-+#define handle_bridge(skb, pt_prev, ret) (0)
-+#endif
-+
-
-
- #ifdef CONFIG_NET_CLS_ACT
-@@ -1812,7 +1803,7 @@ ncls:
-
- handle_diverter(skb);
-
-- if (__handle_bridge(skb, &pt_prev, &ret))
-+ if (handle_bridge(&skb, &pt_prev, &ret))
- goto out;
-
- type = skb->protocol;
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-17
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-17 2005-06-30 04:31:37 UTC (rev 3410)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-17 2005-06-30 06:12:44 UTC (rev 3411)
@@ -15,7 +15,8 @@
#+ mm-mmap-range-test.dpatch
+ mm-rmap-out-of-bounds-pte.dpatch
+ net-bridge-netfilter-etables-smp-race.dpatch
-+ net-bridge-mangle-oops.dpatch
++ net-bridge-mangle-oops-1.dpatch
++ net-bridge-mangle-oops-2.dpatch
+ net-bridge-forwarding-poison.dpatch
+ net-ipv4-netfilter-ip_queue-deadlock.dpatch
+ net-rose-ndigis-verify.dpatch