Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorDavid S. Miller <davem@davemloft.net>
Tue, 3 Aug 2010 05:22:46 +0000 (22:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Aug 2010 05:22:46 +0000 (22:22 -0700)
Conflicts:
drivers/net/e1000e/hw.h
net/bridge/br_device.c
net/bridge/br_input.c

drivers/net/e1000e/hw.h
net/bridge/br_device.c
net/bridge/br_fdb.c
net/bridge/br_input.c
net/bridge/br_stp_bpdu.c
net/ipv4/tcp.c
net/sched/act_nat.c

index 0cd569a57f6d2546bfcf9bb0bb248ec00422a77a..a419b0715985d32c9b937dde9c86397756441beb 100644 (file)
@@ -312,7 +312,7 @@ enum e1e_registers {
 #define E1000_KMRNCTRLSTA_INBAND_PARAM 0x9    /* Kumeran InBand Parameters */
 #define E1000_KMRNCTRLSTA_DIAG_NELPBK  0x1000 /* Nearend Loopback mode */
 #define E1000_KMRNCTRLSTA_K1_CONFIG    0x7
-#define E1000_KMRNCTRLSTA_K1_ENABLE    0x140E
+#define E1000_KMRNCTRLSTA_K1_ENABLE    0x0002
 #define E1000_KMRNCTRLSTA_HD_CTRL      0x0002
 
 #define IFE_PHY_EXTENDED_STATUS_CONTROL        0x10
index 075c435ad22d85810fbeecbae807309cca3582bb..cf09fe591fc20cc73a2fdd20d13860f88c33134d 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/uaccess.h>
 #include "br_private.h"
 
-/* net device transmit always called with no BH (preempt_disabled) */
+/* net device transmit always called with BH disabled */
 netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct net_bridge *br = netdev_priv(dev);
@@ -48,13 +48,16 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
        skb_reset_mac_header(skb);
        skb_pull(skb, ETH_HLEN);
 
+       rcu_read_lock();
        if (is_multicast_ether_addr(dest)) {
                if (unlikely(netpoll_tx_running(dev))) {
                        br_flood_deliver(br, skb);
                        goto out;
                }
-               if (br_multicast_rcv(br, NULL, skb))
+               if (br_multicast_rcv(br, NULL, skb)) {
+                       kfree_skb(skb);
                        goto out;
+               }
 
                mdst = br_mdb_get(br, skb);
                if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))
@@ -67,6 +70,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
                br_flood_deliver(br, skb);
 
 out:
+       rcu_read_unlock();
        return NETDEV_TX_OK;
 }
 
index a744296fc675a9b79d65f07eef2a113c834a8607..90512ccfd3e973c19adade047de7eda77ffd2963 100644 (file)
@@ -214,7 +214,7 @@ void br_fdb_delete_by_port(struct net_bridge *br,
        spin_unlock_bh(&br->hash_lock);
 }
 
-/* No locking or refcounting, assumes caller has no preempt (rcu_read_lock) */
+/* No locking or refcounting, assumes caller has rcu_read_lock */
 struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br,
                                          const unsigned char *addr)
 {
index 5fc1c5b1c36054dcd4b44c521691429c1bc6b167..826cd5221536cadd3b0d13dfec2e9d3639b92a93 100644 (file)
@@ -39,7 +39,7 @@ static int br_pass_frame_up(struct sk_buff *skb)
                       netif_receive_skb);
 }
 
-/* note: already called with rcu_read_lock (preempt_disabled) */
+/* note: already called with rcu_read_lock */
 int br_handle_frame_finish(struct sk_buff *skb)
 {
        const unsigned char *dest = eth_hdr(skb)->h_dest;
@@ -110,7 +110,7 @@ drop:
        goto out;
 }
 
-/* note: already called with rcu_read_lock (preempt_disabled) */
+/* note: already called with rcu_read_lock */
 static int br_handle_local_finish(struct sk_buff *skb)
 {
        struct net_bridge_port *p = br_port_get_rcu(skb->dev);
@@ -133,8 +133,7 @@ static inline int is_link_local(const unsigned char *dest)
 
 /*
  * Return NULL if skb is handled
- * note: already called with rcu_read_lock (preempt_disabled) from
- * netif_receive_skb
+ * note: already called with rcu_read_lock
  */
 struct sk_buff *br_handle_frame(struct sk_buff *skb)
 {
index 70aecb48fb69b80e608e65af295645f984b3acd4..35cf27087b561d6e9955fd75b4b03213a6e9e8d8 100644 (file)
@@ -131,7 +131,7 @@ void br_send_tcn_bpdu(struct net_bridge_port *p)
 /*
  * Called from llc.
  *
- * NO locks, but rcu_read_lock (preempt_disabled)
+ * NO locks, but rcu_read_lock
  */
 void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb,
                struct net_device *dev)
index 1a700651600b89f043f34c8be4eba9138daa0e61..176e11aaea771795b21c0be6b1453b46c6349f0c 100644 (file)
@@ -2187,6 +2187,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
                                      GFP_KERNEL);
                        if (cvp == NULL)
                                return -ENOMEM;
+
+                       kref_init(&cvp->kref);
                }
                lock_sock(sk);
                tp->rx_opt.cookie_in_always =
@@ -2201,12 +2203,11 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
                                 */
                                kref_put(&tp->cookie_values->kref,
                                         tcp_cookie_values_release);
-                               kref_init(&cvp->kref);
-                               tp->cookie_values = cvp;
                        } else {
                                cvp = tp->cookie_values;
                        }
                }
+
                if (cvp != NULL) {
                        cvp->cookie_desired = ctd.tcpct_cookie_desired;
 
@@ -2220,6 +2221,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
                                cvp->s_data_desired = ctd.tcpct_s_data_desired;
                                cvp->s_data_constant = 0; /* false */
                        }
+
+                       tp->cookie_values = cvp;
                }
                release_sock(sk);
                return err;
index 24e614c495f26091d5acdc8af3a8f951d8d984c2..d0386a413e8dc9406d470e66af196efc40f4e226 100644 (file)
@@ -218,6 +218,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
                if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
                        goto drop;
 
+               icmph = (void *)(skb_network_header(skb) + ihl);
                iph = (void *)(icmph + 1);
                if (egress)
                        addr = iph->daddr;
@@ -246,7 +247,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
                        iph->saddr = new_addr;
 
                inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
-                                        1);
+                                        0);
                break;
        }
        default: