Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
authorDavid S. Miller <davem@davemloft.net>
Sat, 29 Mar 2008 02:44:58 +0000 (19:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Mar 2008 02:44:58 +0000 (19:44 -0700)
16 files changed:
drivers/atm/firestream.c
drivers/net/bonding/bond_sysfs.c
drivers/net/wan/lapbether.c
include/linux/netdevice.h
include/net/llc.h
net/bluetooth/hci_sock.c
net/bluetooth/l2cap.c
net/bluetooth/rfcomm/sock.c
net/bluetooth/sco.c
net/ipv4/inet_fragment.c
net/ipv4/ip_forward.c
net/ipv6/netfilter/nf_conntrack_reasm.c
net/llc/llc_core.c
net/llc/llc_input.c
net/llc/llc_station.c
net/sched/sch_generic.c

index 47c57a4294b7c8beccb38ee7e4ed62fc388ad4fc..98099f526d82663343bf85bae33781616fe5e651 100644 (file)
@@ -978,6 +978,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
                /* Docs are vague about this atm_hdr field. By the way, the FS
                 * chip makes odd errors if lower bits are set.... -- REW */
                tc->atm_hdr =  (vpi << 20) | (vci << 4); 
+               tmc0 = 0;
                {
                        int pcr = atm_pcr_goal (txtp);
 
index 90a1f31e8e637bd104a09490b8d05db80b0b5acc..979c2d05ff9c91c19ab7dbee9964cfc608afc299 100644 (file)
@@ -341,6 +341,7 @@ static ssize_t bonding_store_slaves(struct device *d,
 
        if (command[0] == '-') {
                dev = NULL;
+               original_mtu = 0;
                bond_for_each_slave(bond, slave, i)
                        if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) {
                                dev = slave->dev;
index fb37b809523150d2424710d7cdfdb5c1bff206e7..824df3b5ea4983a504b7eafedf2cfbea25ebda84 100644 (file)
@@ -58,7 +58,7 @@ struct lapbethdev {
        struct net_device_stats stats;          /* some statistics */
 };
 
-static struct list_head lapbeth_devices = LIST_HEAD_INIT(lapbeth_devices);
+static LIST_HEAD(lapbeth_devices);
 
 /* ------------------------------------------------------------------------ */
 
index fae6a7ececdbb164ffcf4c5fbdd4c96dffafbc41..ee81906b5164deccb24ed396f95697b4a79638b2 100644 (file)
@@ -1074,12 +1074,14 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
 }
 
 /* Use this variant when it is known for sure that it
- * is executing from interrupt context.
+ * is executing from hardware interrupt context or with hardware interrupts
+ * disabled.
  */
 extern void dev_kfree_skb_irq(struct sk_buff *skb);
 
 /* Use this variant in places where it could be invoked
- * either from interrupt or non-interrupt context.
+ * from either hardware interrupt or other context, with hardware interrupts
+ * either disabled or enabled.
  */
 extern void dev_kfree_skb_any(struct sk_buff *skb);
 
index f5024583fc8b53311358204f2874173f78eabf28..7940da1606e7514697d45bf8be3f93bede4ddb0b 100644 (file)
@@ -65,7 +65,6 @@ struct llc_sap {
 
 extern struct list_head llc_sap_list;
 extern rwlock_t llc_sap_list_lock;
-extern unsigned char llc_station_mac_sa[ETH_ALEN];
 
 extern int llc_rcv(struct sk_buff *skb, struct net_device *dev,
                   struct packet_type *pt, struct net_device *orig_dev);
index b5d4019d3572c59eefe328a22085645d6132b136..1d36c093523b988af1c93f0ce5b39d225c7d2b0c 100644 (file)
@@ -84,7 +84,7 @@ static struct hci_sec_filter hci_sec_filter = {
 };
 
 static struct bt_sock_list hci_sk_list = {
-       .lock = RW_LOCK_UNLOCKED
+       .lock = __RW_LOCK_UNLOCKED(hci_sk_list.lock)
 };
 
 /* Send frame to RAW socket */
index 34f8bf98bc0529b4d69f7c60ff6f739ed63077a3..2957df4b6c0b01fd1db0d9e1b45081d41f786739 100644 (file)
@@ -62,7 +62,7 @@ static u32 l2cap_feat_mask = 0x0000;
 static const struct proto_ops l2cap_sock_ops;
 
 static struct bt_sock_list l2cap_sk_list = {
-       .lock = RW_LOCK_UNLOCKED
+       .lock = __RW_LOCK_UNLOCKED(l2cap_sk_list.lock)
 };
 
 static void __l2cap_sock_close(struct sock *sk, int reason);
index c46d51035e77fa9e1f4db6e95fadb3f2e17f3e60..af4e3934ee841d216970bd5ece7fe4b989c04421 100644 (file)
@@ -60,7 +60,7 @@
 static const struct proto_ops rfcomm_sock_ops;
 
 static struct bt_sock_list rfcomm_sk_list = {
-       .lock = RW_LOCK_UNLOCKED
+       .lock = __RW_LOCK_UNLOCKED(rfcomm_sk_list.lock)
 };
 
 static void rfcomm_sock_close(struct sock *sk);
index b91d3c81a73c58981ab105dd952bcafc65df35c6..cd887cdca426b68d7af1c58ea9e8e69cd74913e2 100644 (file)
@@ -58,7 +58,7 @@
 static const struct proto_ops sco_sock_ops;
 
 static struct bt_sock_list sco_sk_list = {
-       .lock = RW_LOCK_UNLOCKED
+       .lock = __RW_LOCK_UNLOCKED(sco_sk_list.lock)
 };
 
 static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent);
index 724d69aed031974234501ff024852b7a55ea1810..a0a3c78cb5e0dc7ff600bb9897d85d7619153612 100644 (file)
@@ -86,7 +86,10 @@ EXPORT_SYMBOL(inet_frags_fini);
 void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f)
 {
        nf->low_thresh = 0;
+
+       local_bh_disable();
        inet_frag_evictor(nf, f);
+       local_bh_enable();
 }
 EXPORT_SYMBOL(inet_frags_exit_net);
 
index 0b3b328d82db608519ce2fbb57050b1f944da959..a4506c8cfef0a9b7788909375f31effa8a505c89 100644 (file)
@@ -85,7 +85,7 @@ int ip_forward(struct sk_buff *skb)
        if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
                goto sr_failed;
 
-       if (unlikely(skb->len > dst_mtu(&rt->u.dst) &&
+       if (unlikely(skb->len > dst_mtu(&rt->u.dst) && !skb_is_gso(skb) &&
                     (ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
                IP_INC_STATS(IPSTATS_MIB_FRAGFAILS);
                icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
index 2a0d698b24d5b3404305c1ebacb7306080bd0a52..24c0d03095bf8620894d4d2748b9953bc66f90a7 100644 (file)
@@ -171,7 +171,9 @@ static __inline__ void fq_kill(struct nf_ct_frag6_queue *fq)
 
 static void nf_ct_frag6_evictor(void)
 {
+       local_bh_disable();
        inet_frag_evictor(&nf_init_frags, &nf_frags);
+       local_bh_enable();
 }
 
 static void nf_ct_frag6_expire(unsigned long data)
index 248b5903bb1348e07f594e5f54119963de82f365..00de27cef46bb804db0392a8d29ade9f820bae0b 100644 (file)
@@ -25,8 +25,6 @@
 LIST_HEAD(llc_sap_list);
 DEFINE_RWLOCK(llc_sap_list_lock);
 
-unsigned char llc_station_mac_sa[ETH_ALEN];
-
 /**
  *     llc_sap_alloc - allocates and initializes sap.
  *
@@ -37,8 +35,8 @@ static struct llc_sap *llc_sap_alloc(void)
        struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC);
 
        if (sap) {
+               /* sap->laddr.mac - leave as a null, it's filled by bind */
                sap->state = LLC_SAP_STATE_ACTIVE;
-               memcpy(sap->laddr.mac, llc_station_mac_sa, ETH_ALEN);
                rwlock_init(&sap->sk_list.lock);
                atomic_set(&sap->refcnt, 1);
        }
@@ -167,10 +165,6 @@ static int __init llc_init(void)
        if (dev != NULL)
                dev = next_net_device(dev);
 
-       if (dev != NULL)
-               memcpy(llc_station_mac_sa, dev->dev_addr, ETH_ALEN);
-       else
-               memset(llc_station_mac_sa, 0, ETH_ALEN);
        dev_add_pack(&llc_packet_type);
        dev_add_pack(&llc_tr_packet_type);
        return 0;
index c40c9b2a345aca6058d222ad662f4a830c943d7e..bfd2567dd365605afc287a684e0e91fe063d89e1 100644 (file)
@@ -117,8 +117,12 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
        skb_pull(skb, llc_len);
        if (skb->protocol == htons(ETH_P_802_2)) {
                __be16 pdulen = eth_hdr(skb)->h_proto;
-               u16 data_size = ntohs(pdulen) - llc_len;
+               s32 data_size = ntohs(pdulen) - llc_len;
 
+               if (data_size < 0 ||
+                   ((skb_tail_pointer(skb) -
+                     (u8 *)pdu) - llc_len) < data_size)
+                       return 0;
                if (unlikely(pskb_trim_rcsum(skb, data_size)))
                        return 0;
        }
index 6f2ea2090322000f4c28aaf11ae414ed57519c55..959e7f31833b82e1d1bc2d8892611f7f7b23a5da 100644 (file)
@@ -259,7 +259,7 @@ static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb)
                goto out;
        llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, 0, LLC_PDU_CMD);
        llc_pdu_init_as_xid_cmd(nskb, LLC_XID_NULL_CLASS_2, 127);
-       rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, llc_station_mac_sa);
+       rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, skb->dev->dev_addr);
        if (unlikely(rc))
                goto free;
        llc_station_send_pdu(nskb);
@@ -283,7 +283,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb)
        llc_pdu_decode_ssap(skb, &dsap);
        llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
        llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 127);
-       rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da);
+       rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
        if (unlikely(rc))
                goto free;
        llc_station_send_pdu(nskb);
@@ -307,7 +307,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb)
        llc_pdu_decode_ssap(skb, &dsap);
        llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP);
        llc_pdu_init_as_test_rsp(nskb, skb);
-       rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da);
+       rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da);
        if (unlikely(rc))
                goto free;
        llc_station_send_pdu(nskb);
index 10b5c0887fff3068c887da695dbca63854a97de2..b741618e4d54048e67dcf90e7d393e72a0541423 100644 (file)
@@ -184,10 +184,22 @@ static inline int qdisc_restart(struct net_device *dev)
 
 void __qdisc_run(struct net_device *dev)
 {
-       do {
-               if (!qdisc_restart(dev))
+       unsigned long start_time = jiffies;
+
+       while (qdisc_restart(dev)) {
+               if (netif_queue_stopped(dev))
+                       break;
+
+               /*
+                * Postpone processing if
+                * 1. another process needs the CPU;
+                * 2. we've been doing it for too long.
+                */
+               if (need_resched() || jiffies != start_time) {
+                       netif_schedule(dev);
                        break;
-       } while (!netif_queue_stopped(dev));
+               }
+       }
 
        clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
 }