Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Mar 2013 02:42:29 +0000 (18:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Mar 2013 02:42:29 +0000 (18:42 -0800)
Pull networking fixes from David Miller:
 "A moderately sized pile of fixes, some specifically for merge window
  introduced regressions although others are for longer standing items
  and have been queued up for -stable.

  I'm kind of tired of all the RDS protocol bugs over the years, to be
  honest, it's way out of proportion to the number of people who
  actually use it.

   1) Fix missing range initialization in netfilter IPSET, from Jozsef
      Kadlecsik.

   2) ieee80211_local->tim_lock needs to use BH disabling, from Johannes
      Berg.

   3) Fix DMA syncing in SFC driver, from Ben Hutchings.

   4) Fix regression in BOND device MAC address setting, from Jiri
      Pirko.

   5) Missing usb_free_urb in ISDN Hisax driver, from Marina Makienko.

   6) Fix UDP checksumming in bnx2x driver for 57710 and 57711 chips,
      fix from Dmitry Kravkov.

   7) Missing cfgspace_lock initialization in BCMA driver.

   8) Validate parameter size for SCTP assoc stats getsockopt(), from
      Guenter Roeck.

   9) Fix SCTP association hangs, from Lee A Roberts.

  10) Fix jumbo frame handling in r8169, from Francois Romieu.

  11) Fix phy_device memory leak, from Petr Malat.

  12) Omit trailing FCS from frames received in BGMAC driver, from Hauke
      Mehrtens.

  13) Missing socket refcount release in L2TP, from Guillaume Nault.

  14) sctp_endpoint_init should respect passed in gfp_t, rather than use
      GFP_KERNEL unconditionally.  From Dan Carpenter.

  15) Add AISX AX88179 USB driver, from Freddy Xin.

  16) Remove MAINTAINERS entries for drivers deleted during the merge
      window, from Cesar Eduardo Barros.

  17) RDS protocol can try to allocate huge amounts of memory, check
      that the user's request length makes sense, from Cong Wang.

  18) SCTP should use the provided KMALLOC_MAX_SIZE instead of it's own,
      bogus, definition.  From Cong Wang.

  19) Fix deadlocks in FEC driver by moving TX reclaim into NAPI poll,
      from Frank Li.  Also, fix a build error introduced in the merge
      window.

  20) Fix bogus purging of default routes in ipv6, from Lorenzo Colitti.

  21) Don't double count RTT measurements when we leave the TCP receive
      fast path, from Neal Cardwell."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits)
  tcp: fix double-counted receiver RTT when leaving receiver fast path
  CAIF: fix sparse warning for caif_usb
  rds: simplify a warning message
  net: fec: fix build error in no MXC platform
  net: ipv6: Don't purge default router if accept_ra=2
  net: fec: put tx to napi poll function to fix dead lock
  sctp: use KMALLOC_MAX_SIZE instead of its own MAX_KMALLOC_SIZE
  rds: limit the size allocated by rds_message_alloc()
  MAINTAINERS: remove eexpress
  MAINTAINERS: remove drivers/net/wan/cycx*
  MAINTAINERS: remove 3c505
  caif_dev: fix sparse warnings for caif_flow_cb
  ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver
  sctp: use the passed in gfp flags instead GFP_KERNEL
  ipv[4|6]: correct dropwatch false positive in local_deliver_finish
  l2tp: Restore socket refcount when sendmsg succeeds
  net/phy: micrel: Disable asymmetric pause for KSZ9021
  bgmac: omit the fcs
  phy: Fix phy_device_free memory leak
  bnx2x: Fix KR2 work-around condition
  ...

1  2 
MAINTAINERS
drivers/net/ethernet/broadcom/bgmac.c
net/mac80211/tx.c
net/sctp/endpointola.c
net/sctp/socket.c

diff --combined MAINTAINERS
@@@ -97,13 -97,12 +97,13 @@@ Descriptions of section entries
           X:   net/ipv6/
           matches all files in and below net excluding net/ipv6/
        K: Keyword perl extended regex pattern to match content in a
 -         patch or file.  For instance:
 +         patch or file, or an affected filename.  For instance:
           K: of_get_profile
 -            matches patches or files that contain "of_get_profile"
 +            matches patch or file content, or filenames, that contain
 +            "of_get_profile"
           K: \b(printk|pr_(info|err))\b
 -            matches patches or files that contain one or more of the words
 -            printk, pr_info or pr_err
 +            matches patch or file content, or filenames, that contain one or
 +            more of the words printk, pr_info or pr_err
           One regex pattern per line.  Multiple K: lines acceptable.
  
  Note: For the hard of thinking, this list is meant to remain in alphabetical
@@@ -114,12 -113,6 +114,6 @@@ Maintainers List (try to look for most 
  
                -----------------------------------
  
- 3C505 NETWORK DRIVER
- M:    Philip Blundell <philb@gnu.org>
- L:    netdev@vger.kernel.org
- S:    Maintained
- F:    drivers/net/ethernet/i825xx/3c505*
  3C59X NETWORK DRIVER
  M:    Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
  L:    netdev@vger.kernel.org
@@@ -1800,8 -1793,7 +1794,8 @@@ F:      drivers/bcma
  F:    include/linux/bcma/
  
  BROCADE BFA FC SCSI DRIVER
 -M:    Krishna C Gudipati <kgudipat@brocade.com>
 +M:    Anil Gurumurthy <agurumur@brocade.com>
 +M:    Vijaya Mohan Guvva <vmohan@brocade.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/bfa/
@@@ -2075,8 -2067,8 +2069,8 @@@ S:      Maintaine
  F:    include/linux/clk.h
  
  CISCO FCOE HBA DRIVER
 -M:    Abhijeet Joglekar <abjoglek@cisco.com>
 -M:    Venkata Siva Vijayendra Bhamidipati <vbhamidi@cisco.com>
 +M:    Hiral Patel <hiralpat@cisco.com>
 +M:    Suma Ramars <sramars@cisco.com>
  M:    Brian Uchino <buchino@cisco.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
@@@ -2361,12 -2353,6 +2355,6 @@@ W:     http://www.arm.linux.org.uk
  S:    Maintained
  F:    drivers/video/cyber2000fb.*
  
- CYCLADES 2X SYNC CARD DRIVER
- M:    Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
- W:    http://oops.ghostprotocols.net:81/blog
- S:    Maintained
- F:    drivers/net/wan/cycx*
  CYCLADES ASYNC MUX DRIVER
  W:    http://www.cyclades.com/
  S:    Orphan
@@@ -2904,13 -2890,6 +2892,13 @@@ W:    bluesmoke.sourceforge.ne
  S:    Maintained
  F:    drivers/edac/e7xxx_edac.c
  
 +EDAC-GHES
 +M:    Mauro Carvalho Chehab <mchehab@redhat.com>
 +L:    linux-edac@vger.kernel.org
 +W:    bluesmoke.sourceforge.net
 +S:    Maintained
 +F:    drivers/edac/ghes-edac.c
 +
  EDAC-I82443BXGX
  M:    Tim Small <tim@buttersideup.com>
  L:    linux-edac@vger.kernel.org
@@@ -3067,12 -3046,6 +3055,6 @@@ T:     git git://git.kernel.org/pub/scm/lin
  F:    drivers/video/s1d13xxxfb.c
  F:    include/video/s1d13xxxfb.h
  
- ETHEREXPRESS-16 NETWORK DRIVER
- M:    Philip Blundell <philb@gnu.org>
- L:    netdev@vger.kernel.org
- S:    Maintained
- F:    drivers/net/ethernet/i825xx/eexpress.*
  ETHERNET BRIDGE
  M:    Stephen Hemminger <stephen@networkplumber.org>
  L:    bridge@lists.linux-foundation.org
@@@ -5204,18 -5177,6 +5186,18 @@@ F:    drivers/mtd
  F:    include/linux/mtd/
  F:    include/uapi/mtd/
  
 +METAG ARCHITECTURE
 +M:    James Hogan <james.hogan@imgtec.com>
 +S:    Supported
 +F:    arch/metag/
 +F:    Documentation/metag/
 +F:    Documentation/devicetree/bindings/metag/
 +F:    drivers/clocksource/metag_generic.c
 +F:    drivers/irqchip/irq-metag.c
 +F:    drivers/irqchip/irq-metag-ext.c
 +F:    drivers/tty/metag_da.c
 +F:    fs/imgdafs/
 +
  MICROBLAZE ARCHITECTURE
  M:    Michal Simek <monstr@monstr.eu>
  L:    microblaze-uclinux@itee.uq.edu.au (moderated for non-subscribers)
@@@ -5458,7 -5419,6 +5440,7 @@@ F:      net/netrom
  NETWORK BLOCK DEVICE (NBD)
  M:    Paul Clements <Paul.Clements@steeleye.com>
  S:    Maintained
 +L:    nbd-general@lists.sourceforge.net
  F:    Documentation/blockdev/nbd.txt
  F:    drivers/block/nbd.c
  F:    include/linux/nbd.h
@@@ -6534,12 -6494,6 +6516,12 @@@ S:    Maintaine
  F:    Documentation/blockdev/ramdisk.txt
  F:    drivers/block/brd.c
  
 +RAMSAM DRIVER (IBM RamSan 70/80 PCI SSD Flash Card)
 +M:    Joshua Morris <josh.h.morris@us.ibm.com>
 +M:    Philip Kelleher <pjk1939@linux.vnet.ibm.com>
 +S:    Maintained
 +F:    drivers/block/rsxx/
 +
  RANDOM NUMBER DRIVER
  M:    Theodore Ts'o" <tytso@mit.edu>
  S:    Maintained
@@@ -7567,7 -7521,6 +7549,7 @@@ STAGING - NVIDIA COMPLIANT EMBEDDED CON
  M:    Julian Andres Klode <jak@jak-linux.org>
  M:    Marc Dietrich <marvin24@gmx.de>
  L:    ac100@lists.launchpad.net (moderated for non-subscribers)
 +L:    linux-tegra@vger.kernel.org
  S:    Maintained
  F:    drivers/staging/nvec/
  
@@@ -7694,12 -7647,6 +7676,12 @@@ F:    lib/swiotlb.
  F:    arch/*/kernel/pci-swiotlb.c
  F:    include/linux/swiotlb.h
  
 +SYNOPSYS ARC ARCHITECTURE
 +M:    Vineet Gupta <vgupta@synopsys.com>
 +L:    linux-snps-arc@vger.kernel.org
 +S:    Supported
 +F:    arch/arc/
 +
  SYSV FILESYSTEM
  M:    Christoph Hellwig <hch@infradead.org>
  S:    Maintained
@@@ -7866,7 -7813,9 +7848,7 @@@ L:      linux-tegra@vger.kernel.or
  Q:    http://patchwork.ozlabs.org/project/linux-tegra/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git
  S:    Supported
 -F:    arch/arm/mach-tegra
 -F:    arch/arm/boot/dts/tegra*
 -F:    arch/arm/configs/tegra_defconfig
 +K:    (?i)[^a-z]tegra
  
  TEHUTI ETHERNET DRIVER
  M:    Andy Gospodarek <andy@greyhouse.net>
@@@ -15,7 -15,7 +15,7 @@@
  #include <linux/mii.h>
  #include <linux/interrupt.h>
  #include <linux/dma-mapping.h>
 -#include <asm/mach-bcm47xx/nvram.h>
 +#include <bcm47xx_nvram.h>
  
  static const struct bcma_device_id bgmac_bcma_tbl[] = {
        BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_4706_MAC_GBIT, BCMA_ANY_REV, BCMA_ANY_CLASS),
@@@ -301,12 -301,16 +301,16 @@@ static int bgmac_dma_rx_read(struct bgm
                        bgmac_err(bgmac, "Found poisoned packet at slot %d, DMA issue!\n",
                                  ring->start);
                } else {
+                       /* Omit CRC. */
+                       len -= ETH_FCS_LEN;
                        new_skb = netdev_alloc_skb_ip_align(bgmac->net_dev, len);
                        if (new_skb) {
                                skb_put(new_skb, len);
                                skb_copy_from_linear_data_offset(skb, BGMAC_RX_FRAME_OFFSET,
                                                                 new_skb->data,
                                                                 len);
+                               skb_checksum_none_assert(skb);
                                new_skb->protocol =
                                        eth_type_trans(new_skb, bgmac->net_dev);
                                netif_receive_skb(new_skb);
@@@ -908,7 -912,7 +912,7 @@@ static void bgmac_chip_reset(struct bgm
                             BGMAC_CHIPCTL_1_IF_TYPE_RMII;
                char buf[2];
  
 -              if (nvram_getenv("et_swtype", buf, 1) > 0) {
 +              if (bcm47xx_nvram_getenv("et_swtype", buf, 1) > 0) {
                        if (kstrtou8(buf, 0, &et_swtype))
                                bgmac_err(bgmac, "Failed to parse et_swtype (%s)\n",
                                          buf);
@@@ -1386,7 -1390,7 +1390,7 @@@ static int bgmac_probe(struct bcma_devi
        }
  
        bgmac->int_mask = BGMAC_IS_ERRMASK | BGMAC_IS_RX | BGMAC_IS_TX_MASK;
 -      if (nvram_getenv("et0_no_txint", NULL, 0) == 0)
 +      if (bcm47xx_nvram_getenv("et0_no_txint", NULL, 0) == 0)
                bgmac->int_mask &= ~BGMAC_IS_TX_MASK;
  
        /* TODO: reset the external phy. Specs are needed */
diff --combined net/mac80211/tx.c
@@@ -1231,34 -1231,40 +1231,40 @@@ static bool ieee80211_tx_frags(struct i
                if (local->queue_stop_reasons[q] ||
                    (!txpending && !skb_queue_empty(&local->pending[q]))) {
                        if (unlikely(info->flags &
-                                       IEEE80211_TX_INTFL_OFFCHAN_TX_OK &&
-                                    local->queue_stop_reasons[q] &
-                                       ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL))) {
+                                    IEEE80211_TX_INTFL_OFFCHAN_TX_OK)) {
+                               if (local->queue_stop_reasons[q] &
+                                   ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL)) {
+                                       /*
+                                        * Drop off-channel frames if queues
+                                        * are stopped for any reason other
+                                        * than off-channel operation. Never
+                                        * queue them.
+                                        */
+                                       spin_unlock_irqrestore(
+                                               &local->queue_stop_reason_lock,
+                                               flags);
+                                       ieee80211_purge_tx_queue(&local->hw,
+                                                                skbs);
+                                       return true;
+                               }
+                       } else {
                                /*
-                                * Drop off-channel frames if queues are stopped
-                                * for any reason other than off-channel
-                                * operation. Never queue them.
+                                * Since queue is stopped, queue up frames for
+                                * later transmission from the tx-pending
+                                * tasklet when the queue is woken again.
                                 */
-                               spin_unlock_irqrestore(
-                                       &local->queue_stop_reason_lock, flags);
-                               ieee80211_purge_tx_queue(&local->hw, skbs);
-                               return true;
+                               if (txpending)
+                                       skb_queue_splice_init(skbs,
+                                                             &local->pending[q]);
+                               else
+                                       skb_queue_splice_tail_init(skbs,
+                                                                  &local->pending[q]);
+                               spin_unlock_irqrestore(&local->queue_stop_reason_lock,
+                                                      flags);
+                               return false;
                        }
-                       /*
-                        * Since queue is stopped, queue up frames for later
-                        * transmission from the tx-pending tasklet when the
-                        * queue is woken again.
-                        */
-                       if (txpending)
-                               skb_queue_splice_init(skbs, &local->pending[q]);
-                       else
-                               skb_queue_splice_tail_init(skbs,
-                                                          &local->pending[q]);
-                       spin_unlock_irqrestore(&local->queue_stop_reason_lock,
-                                              flags);
-                       return false;
                }
                spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
  
@@@ -1844,9 -1850,24 +1850,24 @@@ netdev_tx_t ieee80211_subif_start_xmit(
                }
  
                if (!is_multicast_ether_addr(skb->data)) {
+                       struct sta_info *next_hop;
+                       bool mpp_lookup = true;
                        mpath = mesh_path_lookup(sdata, skb->data);
-                       if (!mpath)
+                       if (mpath) {
+                               mpp_lookup = false;
+                               next_hop = rcu_dereference(mpath->next_hop);
+                               if (!next_hop ||
+                                   !(mpath->flags & (MESH_PATH_ACTIVE |
+                                                     MESH_PATH_RESOLVING)))
+                                       mpp_lookup = true;
+                       }
+                       if (mpp_lookup)
                                mppath = mpp_path_lookup(sdata, skb->data);
+                       if (mppath && mpath)
+                               mesh_path_del(mpath->sdata, mpath->dst);
                }
  
                /*
                skb = skb_clone(skb, GFP_ATOMIC);
                if (skb) {
                        unsigned long flags;
 -                      int id, r;
 +                      int id;
  
                        spin_lock_irqsave(&local->ack_status_lock, flags);
 -                      r = idr_get_new_above(&local->ack_status_frames,
 -                                            orig_skb, 1, &id);
 -                      if (r == -EAGAIN) {
 -                              idr_pre_get(&local->ack_status_frames,
 -                                          GFP_ATOMIC);
 -                              r = idr_get_new_above(&local->ack_status_frames,
 -                                                    orig_skb, 1, &id);
 -                      }
 -                      if (WARN_ON(!id) || id > 0xffff) {
 -                              idr_remove(&local->ack_status_frames, id);
 -                              r = -ERANGE;
 -                      }
 +                      id = idr_alloc(&local->ack_status_frames, orig_skb,
 +                                     1, 0x10000, GFP_ATOMIC);
                        spin_unlock_irqrestore(&local->ack_status_lock, flags);
  
 -                      if (!r) {
 +                      if (id >= 0) {
                                info_id = id;
                                info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
                        } else if (skb_shared(skb)) {
@@@ -2350,9 -2381,9 +2371,9 @@@ static int ieee80211_beacon_add_tim(str
        if (local->tim_in_locked_section) {
                __ieee80211_beacon_add_tim(sdata, ps, skb);
        } else {
-               spin_lock(&local->tim_lock);
+               spin_lock_bh(&local->tim_lock);
                __ieee80211_beacon_add_tim(sdata, ps, skb);
-               spin_unlock(&local->tim_lock);
+               spin_unlock_bh(&local->tim_lock);
        }
  
        return 0;
diff --combined net/sctp/endpointola.c
@@@ -155,7 -155,7 +155,7 @@@ static struct sctp_endpoint *sctp_endpo
  
        /* SCTP-AUTH extensions*/
        INIT_LIST_HEAD(&ep->endpoint_shared_keys);
-       null_key = sctp_auth_shkey_create(0, GFP_KERNEL);
+       null_key = sctp_auth_shkey_create(0, gfp);
        if (!null_key)
                goto nomem;
  
@@@ -332,6 -332,7 +332,6 @@@ static struct sctp_association *__sctp_
        struct sctp_transport *t = NULL;
        struct sctp_hashbucket *head;
        struct sctp_ep_common *epb;
 -      struct hlist_node *node;
        int hash;
        int rport;
  
                                 rport);
        head = &sctp_assoc_hashtable[hash];
        read_lock(&head->lock);
 -      sctp_for_each_hentry(epb, node, &head->chain) {
 +      sctp_for_each_hentry(epb, &head->chain) {
                tmp = sctp_assoc(epb);
                if (tmp->ep != ep || rport != tmp->peer.port)
                        continue;
diff --combined net/sctp/socket.c
@@@ -5653,6 -5653,9 +5653,9 @@@ static int sctp_getsockopt_assoc_stats(
        if (len < sizeof(sctp_assoc_t))
                return -EINVAL;
  
+       /* Allow the struct to grow and fill in as much as possible */
+       len = min_t(size_t, len, sizeof(sas));
        if (copy_from_user(&sas, optval, len))
                return -EFAULT;
  
        /* Mark beginning of a new observation period */
        asoc->stats.max_obs_rto = asoc->rto_min;
  
-       /* Allow the struct to grow and fill in as much as possible */
-       len = min_t(size_t, len, sizeof(sas));
        if (put_user(len, optlen))
                return -EFAULT;
  
@@@ -5882,7 -5882,8 +5882,7 @@@ static struct sctp_bind_bucket *sctp_bu
  static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
  {
        struct sctp_bind_hashbucket *head; /* hash list */
 -      struct sctp_bind_bucket *pp; /* hash list port iterator */
 -      struct hlist_node *node;
 +      struct sctp_bind_bucket *pp;
        unsigned short snum;
        int ret;
  
                        index = sctp_phashfn(sock_net(sk), rover);
                        head = &sctp_port_hashtable[index];
                        sctp_spin_lock(&head->lock);
 -                      sctp_for_each_hentry(pp, node, &head->chain)
 +                      sctp_for_each_hentry(pp, &head->chain)
                                if ((pp->port == rover) &&
                                    net_eq(sock_net(sk), pp->net))
                                        goto next;
                 */
                head = &sctp_port_hashtable[sctp_phashfn(sock_net(sk), snum)];
                sctp_spin_lock(&head->lock);
 -              sctp_for_each_hentry(pp, node, &head->chain) {
 +              sctp_for_each_hentry(pp, &head->chain) {
                        if ((pp->port == snum) && net_eq(pp->net, sock_net(sk)))
                                goto pp_found;
                }
@@@ -5969,7 -5970,7 +5969,7 @@@ pp_found
                 * that this port/socket (sk) combination are already
                 * in an endpoint.
                 */
 -              sk_for_each_bound(sk2, node, &pp->owner) {
 +              sk_for_each_bound(sk2, &pp->owner) {
                        struct sctp_endpoint *ep2;
                        ep2 = sctp_sk(sk2)->ep;