]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Sep 2008 04:02:14 +0000 (21:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Sep 2008 04:02:14 +0000 (21:02 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  ipsec: Fix deadlock in xfrm_state management.
  ipv: Re-enable IP when MTU > 68
  net/xfrm: Use an IS_ERR test rather than a NULL test
  ath9: Fix ath_rx_flush_tid() for IRQs disabled kernel warning message.
  ath9k: Incorrect key used when group and pairwise ciphers are different.
  rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON
  mac80211: Fix debugfs union misuse and pointer corruption
  wireless/libertas/if_cs.c: fix memory leaks
  orinoco: Multicast to the specified addresses
  iwlwifi: fix 64bit platform firmware loading
  iwlwifi: fix apm_stop (wrong bit polarity for FLAG_INIT_DONE)
  iwlwifi: workaround interrupt handling no some platforms
  iwlwifi: do not use GFP_DMA in iwl_tx_queue_init
  net/wireless/Kconfig: clarify the description for CONFIG_WIRELESS_EXT_SYSFS
  net: Unbreak userspace usage of linux/mroute.h
  pkt_sched: Fix locking of qdisc_root with qdisc_root_sleeping_lock()
  ipv6: When we droped a packet, we should return NET_RX_DROP instead of 0

29 files changed:
drivers/net/wireless/ath9k/hw.c
drivers/net/wireless/ath9k/main.c
drivers/net/wireless/ath9k/recv.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-fh.h
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/libertas/if_cs.c
drivers/net/wireless/orinoco.c
drivers/net/wireless/rt2x00/rt2x00reg.h
include/linux/Kbuild
include/linux/mroute.h
include/linux/mroute6.h
include/linux/pim.h
net/ipv4/devinet.c
net/ipv6/raw.c
net/mac80211/debugfs_key.c
net/mac80211/ieee80211_i.h
net/sched/cls_api.c
net/sched/cls_route.c
net/sched/sch_api.c
net/sched/sch_cbq.c
net/sched/sch_htb.c
net/sched/sch_netem.c
net/sched/sch_teql.c
net/wireless/Kconfig
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c

index a17eb130f57431e104a9141596037cfe9ef7e31e..6dbfed0b4149ecf2e2c10070f5333bb66edc48e0 100644 (file)
@@ -7285,15 +7285,15 @@ ath9k_hw_set_keycache_entry(struct ath_hal *ah, u16 entry,
                }
                break;
        case ATH9K_CIPHER_WEP:
-               if (k->kv_len < 40 / NBBY) {
+               if (k->kv_len < LEN_WEP40) {
                        DPRINTF(ah->ah_sc, ATH_DBG_KEYCACHE,
                                 "%s: WEP key length %u too small\n",
                                 __func__, k->kv_len);
                        return false;
                }
-               if (k->kv_len <= 40 / NBBY)
+               if (k->kv_len <= LEN_WEP40)
                        keyType = AR_KEYTABLE_TYPE_40;
-               else if (k->kv_len <= 104 / NBBY)
+               else if (k->kv_len <= LEN_WEP104)
                        keyType = AR_KEYTABLE_TYPE_104;
                else
                        keyType = AR_KEYTABLE_TYPE_128;
@@ -7313,7 +7313,7 @@ ath9k_hw_set_keycache_entry(struct ath_hal *ah, u16 entry,
        key2 = get_unaligned_le32(k->kv_val + 6) ^ xorMask;
        key3 = (get_unaligned_le16(k->kv_val + 10) ^ xorMask) & 0xffff;
        key4 = get_unaligned_le32(k->kv_val + 12) ^ xorMask;
-       if (k->kv_len <= 104 / NBBY)
+       if (k->kv_len <= LEN_WEP104)
                key4 &= 0xff;
 
        if (keyType == AR_KEYTABLE_TYPE_TKIP && ATH9K_IS_MIC_ENABLED(ah)) {
index 2888778040e43f28803bab54be3b82a8e8d02232..95b337149484d07978eff5ff7d12b51dac8504e8 100644 (file)
@@ -206,7 +206,8 @@ static int ath_key_config(struct ath_softc *sc,
        if (!ret)
                return -EIO;
 
-       sc->sc_keytype = hk.kv_type;
+       if (mac)
+               sc->sc_keytype = hk.kv_type;
        return 0;
 }
 
@@ -756,7 +757,8 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
                        key->hw_key_idx = key->keyidx;
                        /* push IV and Michael MIC generation to stack */
                        key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
-                       key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
+                       if (key->alg == ALG_TKIP)
+                               key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
                }
                break;
        case DISABLE_KEY:
index 2fe806175c01c3a2ca4afda05fac81cd7f2ccf3d..20ddb7acdb9493c881ced6e2c0e1fb659fc7f003 100644 (file)
@@ -360,8 +360,9 @@ static void ath_rx_flush_tid(struct ath_softc *sc,
        struct ath_arx_tid *rxtid, int drop)
 {
        struct ath_rxbuf *rxbuf;
+       unsigned long flag;
 
-       spin_lock_bh(&rxtid->tidlock);
+       spin_lock_irqsave(&rxtid->tidlock, flag);
        while (rxtid->baw_head != rxtid->baw_tail) {
                rxbuf = rxtid->rxbuf + rxtid->baw_head;
                if (!rxbuf->rx_wbuf) {
@@ -382,7 +383,7 @@ static void ath_rx_flush_tid(struct ath_softc *sc,
                INCR(rxtid->baw_head, ATH_TID_MAX_BUFS);
                INCR(rxtid->seq_next, IEEE80211_SEQ_MAX);
        }
-       spin_unlock_bh(&rxtid->tidlock);
+       spin_unlock_irqrestore(&rxtid->tidlock, flag);
 }
 
 static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc,
index e2581229d8b2b6e6ac68a58f5ae20d001475b50e..23fed32989624a586216405303d118f85df7bc83 100644 (file)
@@ -474,8 +474,8 @@ static void iwl4965_apm_stop(struct iwl_priv *priv)
        iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
 
        udelay(10);
-
-       iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
+       /* clear "init complete"  move adapter D0A* --> D0U state */
+       iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
        spin_unlock_irqrestore(&priv->lock, flags);
 }
 
index cbc01a00eaf4416e42ea3b2261df33506fe52d14..b08036a9d8945555efca52e64df7a87e69270d97 100644 (file)
@@ -145,7 +145,8 @@ static void iwl5000_apm_stop(struct iwl_priv *priv)
 
        udelay(10);
 
-       iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
+       /* clear "init complete"  move adapter D0A* --> D0U state */
+       iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
 
        spin_unlock_irqrestore(&priv->lock, flags);
 }
@@ -577,14 +578,11 @@ static int iwl5000_load_section(struct iwl_priv *priv,
                FH_TFDIB_CTRL0_REG(FH_SRVC_CHNL),
                phy_addr & FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK);
 
-       /* FIME: write the MSB of the phy_addr in CTRL1
-        * iwl_write_direct32(priv,
-               IWL_FH_TFDIB_CTRL1_REG(IWL_FH_SRVC_CHNL),
-               ((phy_addr & MSB_MSK)
-                       << FH_MEM_TFDIB_REG1_ADDR_BITSHIFT) | byte_count);
-        */
        iwl_write_direct32(priv,
-               FH_TFDIB_CTRL1_REG(FH_SRVC_CHNL), byte_cnt);
+               FH_TFDIB_CTRL1_REG(FH_SRVC_CHNL),
+               (iwl_get_dma_hi_address(phy_addr)
+                       << FH_MEM_TFDIB_REG1_ADDR_BITSHIFT) | byte_cnt);
+
        iwl_write_direct32(priv,
                FH_TCSR_CHNL_TX_BUF_STS_REG(FH_SRVC_CHNL),
                1 << FH_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_NUM |
index 061ffba9c884c017c00970bc2a148fd3d6dc0602..c0b73c4d6f44d05c44adea2799e6152e5c099599 100644 (file)
@@ -2602,6 +2602,7 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
 {
        struct iwl_priv *priv = hw->priv;
        int ret;
+       u16 pci_cmd;
 
        IWL_DEBUG_MAC80211("enter\n");
 
@@ -2612,6 +2613,13 @@ static int iwl4965_mac_start(struct ieee80211_hw *hw)
        pci_restore_state(priv->pci_dev);
        pci_enable_msi(priv->pci_dev);
 
+       /* enable interrupts if needed: hw bug w/a */
+       pci_read_config_word(priv->pci_dev, PCI_COMMAND, &pci_cmd);
+       if (pci_cmd & PCI_COMMAND_INTX_DISABLE) {
+               pci_cmd &= ~PCI_COMMAND_INTX_DISABLE;
+               pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd);
+       }
+
        ret = request_irq(priv->pci_dev->irq, iwl4965_isr, IRQF_SHARED,
                          DRV_NAME, priv);
        if (ret) {
index 944642450d3d051b319fb93a302c0fbb4a647ea8..cd11c0ca29918bf75ff2d606885f3cfcd1195de7 100644 (file)
 
 #define FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE      (0x01000000)
 
+#define FH_MEM_TFDIB_REG1_ADDR_BITSHIFT        28
 
 /**
  * Transmit DMA Channel Control/Status Registers (TCSR)
index d82823b5c8abce08948fad392cd9e8c3368aabf5..ff879d46624a887dbe85363acf81e5077ffa2192 100644 (file)
@@ -426,7 +426,7 @@ static int iwl_tx_queue_init(struct iwl_priv *priv,
                                continue;
                }
 
-               txq->cmd[i] = kmalloc(len, GFP_KERNEL | GFP_DMA);
+               txq->cmd[i] = kmalloc(len, GFP_KERNEL);
                if (!txq->cmd[i])
                        return -ENOMEM;
        }
index 04d7a251e3f0c75a9c0084ca6cd401f7bbd980d0..8941919001bbf8a0c120eb8734f9a88f76b6c723 100644 (file)
@@ -595,7 +595,7 @@ static int if_cs_prog_helper(struct if_cs_card *card)
                if (ret < 0) {
                        lbs_pr_err("can't download helper at 0x%x, ret %d\n",
                                sent, ret);
-                       goto done;
+                       goto err_release;
                }
 
                if (count == 0)
@@ -604,9 +604,8 @@ static int if_cs_prog_helper(struct if_cs_card *card)
                sent += count;
        }
 
+err_release:
        release_firmware(fw);
-       ret = 0;
-
 done:
        lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);
        return ret;
@@ -676,14 +675,8 @@ static int if_cs_prog_real(struct if_cs_card *card)
        }
 
        ret = if_cs_poll_while_fw_download(card, IF_CS_SCRATCH, 0x5a);
-       if (ret < 0) {
+       if (ret < 0)
                lbs_pr_err("firmware download failed\n");
-               goto err_release;
-       }
-
-       ret = 0;
-       goto done;
-
 
 err_release:
        release_firmware(fw);
index 1ebcafe7ca5fd7aa90421385ee864c0459a8d17f..36c004e1560218904db4ed2667e18a2eb55fb426 100644 (file)
@@ -1970,6 +1970,9 @@ __orinoco_set_multicast_list(struct net_device *dev)
                        priv->promiscuous = promisc;
        }
 
+       /* If we're not in promiscuous mode, then we need to set the
+        * group address if either we want to multicast, or if we were
+        * multicasting and want to stop */
        if (! promisc && (mc_count || priv->mc_count) ) {
                struct dev_mc_list *p = dev->mc_list;
                struct hermes_multicast mclist;
@@ -1989,9 +1992,10 @@ __orinoco_set_multicast_list(struct net_device *dev)
                        printk(KERN_WARNING "%s: Multicast list is "
                               "longer than mc_count\n", dev->name);
 
-               err = hermes_write_ltv(hw, USER_BAP, HERMES_RID_CNFGROUPADDRESSES,
-                                      HERMES_BYTES_TO_RECLEN(priv->mc_count * ETH_ALEN),
-                                      &mclist);
+               err = hermes_write_ltv(hw, USER_BAP,
+                                  HERMES_RID_CNFGROUPADDRESSES,
+                                  HERMES_BYTES_TO_RECLEN(mc_count * ETH_ALEN),
+                                  &mclist);
                if (err)
                        printk(KERN_ERR "%s: Error %d setting multicast list.\n",
                               dev->name, err);
index 7e88ce5651b95041f35fde0a8ec682b09ca091eb..2ea7866abd5d775c66ebe9050e729c5efe64ef3a 100644 (file)
@@ -136,7 +136,7 @@ struct rt2x00_field32 {
  */
 #define is_power_of_two(x)     ( !((x) & ((x)-1)) )
 #define low_bit_mask(x)                ( ((x)-1) & ~(x) )
-#define is_valid_mask(x)       is_power_of_two(1 + (x) + low_bit_mask(x))
+#define is_valid_mask(x)       is_power_of_two(1LU + (x) + low_bit_mask(x))
 
 /*
  * Macro's to find first set bit in a variable.
@@ -173,8 +173,7 @@ struct rt2x00_field32 {
  * does not exceed the given typelimit.
  */
 #define FIELD_CHECK(__mask, __type)                    \
-       BUILD_BUG_ON(!__builtin_constant_p(__mask) ||   \
-                    !(__mask) ||                       \
+       BUILD_BUG_ON(!(__mask) ||                       \
                     !is_valid_mask(__mask) ||          \
                     (__mask) != (__type)(__mask))      \
 
index 7d970678f9402bbb7c0b73a084831d14dd3d622c..59391250d51c4b1aaf01496ff0b4b372e214fa74 100644 (file)
@@ -297,7 +297,6 @@ unifdef-y += parport.h
 unifdef-y += patchkey.h
 unifdef-y += pci.h
 unifdef-y += personality.h
-unifdef-y += pim.h
 unifdef-y += pktcdvd.h
 unifdef-y += pmu.h
 unifdef-y += poll.h
index 07112ee9293a5aa25b8186db6e19c990c7863f11..8a455694d6826c84b3f606c7ea9c81a888094354 100644 (file)
@@ -6,7 +6,6 @@
 #ifdef __KERNEL__
 #include <linux/in.h>
 #endif
-#include <linux/pim.h>
 
 /*
  *     Based on the MROUTING 3.5 defines primarily to keep
@@ -130,6 +129,7 @@ struct igmpmsg
  */
 
 #ifdef __KERNEL__
+#include <linux/pim.h>
 #include <net/sock.h>
 
 #ifdef CONFIG_IP_MROUTE
index 5cf50473a10f0f6877263bb822a59c865b66163f..6f4c180179e2ef34fd06e2829bc2c99ba4bd39d3 100644 (file)
@@ -115,6 +115,7 @@ struct sioc_mif_req6
 
 #ifdef __KERNEL__
 
+#include <linux/pim.h>
 #include <linux/skbuff.h>      /* for struct sk_buff_head */
 
 #ifdef CONFIG_IPV6_MROUTE
index 236ffd317394c1fc01df81f32cb096775e0aec4b..1ba0661561a44d3dc7aaa6d951d28d8566fdcaa3 100644 (file)
@@ -3,22 +3,6 @@
 
 #include <asm/byteorder.h>
 
-#ifndef __KERNEL__
-struct pim {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
-       __u8    pim_type:4,             /* PIM message type */
-               pim_ver:4;              /* PIM version */
-#elif defined(__BIG_ENDIAN_BITFIELD)
-       __u8    pim_ver:4;              /* PIM version */
-               pim_type:4;             /* PIM message type */
-#endif
-       __u8    pim_rsv;                /* Reserved */
-       __be16  pim_cksum;              /* Checksum */
-};
-
-#define PIM_MINLEN             8
-#endif
-
 /* Message types - V1 */
 #define PIM_V1_VERSION         __constant_htonl(0x10000000)
 #define PIM_V1_REGISTER                1
@@ -27,7 +11,6 @@ struct pim {
 #define PIM_VERSION            2
 #define PIM_REGISTER           1
 
-#if defined(__KERNEL__)
 #define PIM_NULL_REGISTER      __constant_htonl(0x40000000)
 
 /* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
@@ -42,4 +25,3 @@ struct pimreghdr
 struct sk_buff;
 extern int pim_rcv_v1(struct sk_buff *);
 #endif
-#endif
index 91d3d96805d03aef392e0f514b1bd1750a9757d4..b12dae2b0b2dbcc527eee09a5d7309ffd4852ebc 100644 (file)
@@ -1029,6 +1029,11 @@ skip:
        }
 }
 
+static inline bool inetdev_valid_mtu(unsigned mtu)
+{
+       return mtu >= 68;
+}
+
 /* Called only under RTNL semaphore */
 
 static int inetdev_event(struct notifier_block *this, unsigned long event,
@@ -1048,6 +1053,10 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
                                IN_DEV_CONF_SET(in_dev, NOXFRM, 1);
                                IN_DEV_CONF_SET(in_dev, NOPOLICY, 1);
                        }
+               } else if (event == NETDEV_CHANGEMTU) {
+                       /* Re-enabling IP */
+                       if (inetdev_valid_mtu(dev->mtu))
+                               in_dev = inetdev_init(dev);
                }
                goto out;
        }
@@ -1058,7 +1067,7 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
                dev->ip_ptr = NULL;
                break;
        case NETDEV_UP:
-               if (dev->mtu < 68)
+               if (!inetdev_valid_mtu(dev->mtu))
                        break;
                if (dev->flags & IFF_LOOPBACK) {
                        struct in_ifaddr *ifa;
@@ -1080,9 +1089,9 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
                ip_mc_down(in_dev);
                break;
        case NETDEV_CHANGEMTU:
-               if (dev->mtu >= 68)
+               if (inetdev_valid_mtu(dev->mtu))
                        break;
-               /* MTU falled under 68, disable IP */
+               /* disable IP when MTU is not enough */
        case NETDEV_UNREGISTER:
                inetdev_destroy(in_dev);
                break;
index 01d47674f7e5c802214565108e14a820ef7963fc..e53e493606c54b0f6ef36be803d8e73e89ddc1ce 100644 (file)
@@ -377,14 +377,14 @@ static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
            skb_checksum_complete(skb)) {
                atomic_inc(&sk->sk_drops);
                kfree_skb(skb);
-               return 0;
+               return NET_RX_DROP;
        }
 
        /* Charge it to the socket. */
        if (sock_queue_rcv_skb(sk,skb)<0) {
                atomic_inc(&sk->sk_drops);
                kfree_skb(skb);
-               return 0;
+               return NET_RX_DROP;
        }
 
        return 0;
@@ -429,7 +429,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
                if (skb_checksum_complete(skb)) {
                        atomic_inc(&sk->sk_drops);
                        kfree_skb(skb);
-                       return 0;
+                       return NET_RX_DROP;
                }
        }
 
index 7439b63df5d0b72db616e3cf012e310a9720147c..cf82acec913a235a3e87dc4c7222f344449436bd 100644 (file)
@@ -265,7 +265,7 @@ void ieee80211_debugfs_key_add_default(struct ieee80211_sub_if_data *sdata)
        key = sdata->default_key;
        if (key) {
                sprintf(buf, "../keys/%d", key->debugfs.cnt);
-               sdata->debugfs.default_key =
+               sdata->common_debugfs.default_key =
                        debugfs_create_symlink("default_key",
                                               sdata->debugfsdir, buf);
        } else
@@ -277,8 +277,8 @@ void ieee80211_debugfs_key_remove_default(struct ieee80211_sub_if_data *sdata)
        if (!sdata)
                return;
 
-       debugfs_remove(sdata->debugfs.default_key);
-       sdata->debugfs.default_key = NULL;
+       debugfs_remove(sdata->common_debugfs.default_key);
+       sdata->common_debugfs.default_key = NULL;
 }
 
 void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key,
index 586a9b49b0fc6f345c0db6e73e0d96a5b8dbdfd9..4498d8713652ac5b93c82eb7973d4f8812c2cda0 100644 (file)
@@ -496,8 +496,10 @@ struct ieee80211_sub_if_data {
                struct {
                        struct dentry *mode;
                } monitor;
-               struct dentry *default_key;
        } debugfs;
+       struct {
+               struct dentry *default_key;
+       } common_debugfs;
 
 #ifdef CONFIG_MAC80211_MESH
        struct dentry *mesh_stats_dir;
index 5cafdd4c801848f00e3d55daca0d81875d709c7d..8eb79e92e94cb82348a7cf76e8399f46f86426a7 100644 (file)
@@ -205,7 +205,7 @@ replay:
                }
        }
 
-       root_lock = qdisc_root_lock(q);
+       root_lock = qdisc_root_sleeping_lock(q);
 
        if (tp == NULL) {
                /* Proto-tcf does not exist, create new one */
index 481260a4f10f333f6eb9c52a73fb52da02f092eb..e3d8455eebc29c32d37a5b2c943c07de1573b0e1 100644 (file)
@@ -75,7 +75,7 @@ static __inline__ int route4_fastmap_hash(u32 id, int iif)
 static inline
 void route4_reset_fastmap(struct Qdisc *q, struct route4_head *head, u32 id)
 {
-       spinlock_t *root_lock = qdisc_root_lock(q);
+       spinlock_t *root_lock = qdisc_root_sleeping_lock(q);
 
        spin_lock_bh(root_lock);
        memset(head->fastmap, 0, sizeof(head->fastmap));
index 506b709510b65bc0849d284f52bdd617735cc778..1122c952aa99bd17f78f3de3d6c6d6600c3d81b5 100644 (file)
@@ -1169,8 +1169,8 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,
        if (q->stab && qdisc_dump_stab(skb, q->stab) < 0)
                goto nla_put_failure;
 
-       if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,
-                                        TCA_XSTATS, qdisc_root_lock(q), &d) < 0)
+       if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, TCA_XSTATS,
+                                        qdisc_root_sleeping_lock(q), &d) < 0)
                goto nla_put_failure;
 
        if (q->ops->dump_stats && q->ops->dump_stats(q, &d) < 0)
@@ -1461,8 +1461,8 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q,
        if (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0)
                goto nla_put_failure;
 
-       if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,
-                                        TCA_XSTATS, qdisc_root_lock(q), &d) < 0)
+       if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, TCA_XSTATS,
+                                        qdisc_root_sleeping_lock(q), &d) < 0)
                goto nla_put_failure;
 
        if (cl_ops->dump_stats && cl_ops->dump_stats(q, cl, &d) < 0)
index 9b720adedead51611403d0e3dc846b32445e9474..8b06fa9004828c937e359df4c3c0d0c0bfa0ecf3 100644 (file)
@@ -1754,7 +1754,7 @@ static void cbq_put(struct Qdisc *sch, unsigned long arg)
 
        if (--cl->refcnt == 0) {
 #ifdef CONFIG_NET_CLS_ACT
-               spinlock_t *root_lock = qdisc_root_lock(sch);
+               spinlock_t *root_lock = qdisc_root_sleeping_lock(sch);
                struct cbq_sched_data *q = qdisc_priv(sch);
 
                spin_lock_bh(root_lock);
index 97d4761cc31e8633864a40f1cc35e13b8d668614..d14f02056ae6dcc31dbfad8c90ba57424e4a6d45 100644 (file)
@@ -1043,7 +1043,7 @@ static int htb_init(struct Qdisc *sch, struct nlattr *opt)
 
 static int htb_dump(struct Qdisc *sch, struct sk_buff *skb)
 {
-       spinlock_t *root_lock = qdisc_root_lock(sch);
+       spinlock_t *root_lock = qdisc_root_sleeping_lock(sch);
        struct htb_sched *q = qdisc_priv(sch);
        struct nlattr *nest;
        struct tc_htb_glob gopt;
@@ -1075,7 +1075,7 @@ static int htb_dump_class(struct Qdisc *sch, unsigned long arg,
                          struct sk_buff *skb, struct tcmsg *tcm)
 {
        struct htb_class *cl = (struct htb_class *)arg;
-       spinlock_t *root_lock = qdisc_root_lock(sch);
+       spinlock_t *root_lock = qdisc_root_sleeping_lock(sch);
        struct nlattr *nest;
        struct tc_htb_opt opt;
 
index fb0294d0b55e6e71ed87c9b7e1206e755ad5561b..3781e55046d076cc49e5eb80e89bca30ec3eca53 100644 (file)
@@ -341,7 +341,7 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
        for (i = 0; i < n; i++)
                d->table[i] = data[i];
 
-       root_lock = qdisc_root_lock(sch);
+       root_lock = qdisc_root_sleeping_lock(sch);
 
        spin_lock_bh(root_lock);
        d = xchg(&q->delay_dist, d);
index 2c35c678563bec7fafaed3125fe36477b1a7c567..d35ef059abb1781e41becb98e6b1a15e3596001b 100644 (file)
@@ -161,7 +161,7 @@ teql_destroy(struct Qdisc* sch)
                                                txq = netdev_get_tx_queue(master->dev, 0);
                                                master->slaves = NULL;
 
-                                               root_lock = qdisc_root_lock(txq->qdisc);
+                                               root_lock = qdisc_root_sleeping_lock(txq->qdisc);
                                                spin_lock_bh(root_lock);
                                                qdisc_reset(txq->qdisc);
                                                spin_unlock_bh(root_lock);
index ab015c62d5612cd42b558179dee05a00ef3b2218..833b024f8f66ef2e1ac7c8a72a600090e41afa61 100644 (file)
@@ -39,4 +39,5 @@ config WIRELESS_EXT_SYSFS
          files in /sys/class/net/*/wireless/. The same information
          is available via the ioctls as well.
 
-         Say Y if you have programs using it (we don't know of any).
+         Say Y if you have programs using it, like old versions of
+         hal.
index 841b32a2e680818aae4b3eb6d8d3d5504acb616c..46914b79d850abcba3a4d26b1e28d0b187f33309 100644 (file)
@@ -1731,8 +1731,7 @@ restart:
                         * We can't enlist stable bundles either.
                         */
                        write_unlock_bh(&policy->lock);
-                       if (dst)
-                               dst_free(dst);
+                       dst_free(dst);
 
                        if (pol_dead)
                                XFRM_INC_STATS(LINUX_MIB_XFRMOUTPOLDEAD);
@@ -1748,8 +1747,7 @@ restart:
                        err = xfrm_dst_update_origin(dst, fl);
                if (unlikely(err)) {
                        write_unlock_bh(&policy->lock);
-                       if (dst)
-                               dst_free(dst);
+                       dst_free(dst);
                        XFRM_INC_STATS(LINUX_MIB_XFRMOUTBUNDLECHECKERROR);
                        goto error;
                }
index 4c6914ef7d92df5830baba92363108e502217c3f..7bd62f61593f576cd7675c1aa79e58bdbcaa558c 100644 (file)
@@ -780,11 +780,13 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
 {
        unsigned int h;
        struct hlist_node *entry;
-       struct xfrm_state *x, *x0;
+       struct xfrm_state *x, *x0, *to_put;
        int acquire_in_progress = 0;
        int error = 0;
        struct xfrm_state *best = NULL;
 
+       to_put = NULL;
+
        spin_lock_bh(&xfrm_state_lock);
        h = xfrm_dst_hash(daddr, saddr, tmpl->reqid, family);
        hlist_for_each_entry(x, entry, xfrm_state_bydst+h, bydst) {
@@ -833,7 +835,7 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
                if (tmpl->id.spi &&
                    (x0 = __xfrm_state_lookup(daddr, tmpl->id.spi,
                                              tmpl->id.proto, family)) != NULL) {
-                       xfrm_state_put(x0);
+                       to_put = x0;
                        error = -EEXIST;
                        goto out;
                }
@@ -849,7 +851,7 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
                error = security_xfrm_state_alloc_acquire(x, pol->security, fl->secid);
                if (error) {
                        x->km.state = XFRM_STATE_DEAD;
-                       xfrm_state_put(x);
+                       to_put = x;
                        x = NULL;
                        goto out;
                }
@@ -870,7 +872,7 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
                        xfrm_hash_grow_check(x->bydst.next != NULL);
                } else {
                        x->km.state = XFRM_STATE_DEAD;
-                       xfrm_state_put(x);
+                       to_put = x;
                        x = NULL;
                        error = -ESRCH;
                }
@@ -881,6 +883,8 @@ out:
        else
                *err = acquire_in_progress ? -EAGAIN : error;
        spin_unlock_bh(&xfrm_state_lock);
+       if (to_put)
+               xfrm_state_put(to_put);
        return x;
 }
 
@@ -1067,18 +1071,20 @@ static struct xfrm_state *__xfrm_find_acq_byseq(u32 seq);
 
 int xfrm_state_add(struct xfrm_state *x)
 {
-       struct xfrm_state *x1;
+       struct xfrm_state *x1, *to_put;
        int family;
        int err;
        int use_spi = xfrm_id_proto_match(x->id.proto, IPSEC_PROTO_ANY);
 
        family = x->props.family;
 
+       to_put = NULL;
+
        spin_lock_bh(&xfrm_state_lock);
 
        x1 = __xfrm_state_locate(x, use_spi, family);
        if (x1) {
-               xfrm_state_put(x1);
+               to_put = x1;
                x1 = NULL;
                err = -EEXIST;
                goto out;
@@ -1088,7 +1094,7 @@ int xfrm_state_add(struct xfrm_state *x)
                x1 = __xfrm_find_acq_byseq(x->km.seq);
                if (x1 && ((x1->id.proto != x->id.proto) ||
                    xfrm_addr_cmp(&x1->id.daddr, &x->id.daddr, family))) {
-                       xfrm_state_put(x1);
+                       to_put = x1;
                        x1 = NULL;
                }
        }
@@ -1110,6 +1116,9 @@ out:
                xfrm_state_put(x1);
        }
 
+       if (to_put)
+               xfrm_state_put(to_put);
+
        return err;
 }
 EXPORT_SYMBOL(xfrm_state_add);
@@ -1269,10 +1278,12 @@ EXPORT_SYMBOL(xfrm_state_migrate);
 
 int xfrm_state_update(struct xfrm_state *x)
 {
-       struct xfrm_state *x1;
+       struct xfrm_state *x1, *to_put;
        int err;
        int use_spi = xfrm_id_proto_match(x->id.proto, IPSEC_PROTO_ANY);
 
+       to_put = NULL;
+
        spin_lock_bh(&xfrm_state_lock);
        x1 = __xfrm_state_locate(x, use_spi, x->props.family);
 
@@ -1281,7 +1292,7 @@ int xfrm_state_update(struct xfrm_state *x)
                goto out;
 
        if (xfrm_state_kern(x1)) {
-               xfrm_state_put(x1);
+               to_put = x1;
                err = -EEXIST;
                goto out;
        }
@@ -1295,6 +1306,9 @@ int xfrm_state_update(struct xfrm_state *x)
 out:
        spin_unlock_bh(&xfrm_state_lock);
 
+       if (to_put)
+               xfrm_state_put(to_put);
+
        if (err)
                return err;