1. 14 Jan, 2015 1 commit
    • Arnd Bergmann's avatar
      bridge: only provide proxy ARP when CONFIG_INET is enabled · d92cfdbb
      Arnd Bergmann authored
      When IPV4 support is disabled, we cannot call arp_send from
      the bridge code, which would result in a kernel link error:
      net/built-in.o: In function `br_handle_frame_finish':
      :(.text+0x59914): undefined reference to `arp_send'
      :(.text+0x59a50): undefined reference to `arp_tbl'
      This makes the newly added proxy ARP support in the bridge
      code depend on the CONFIG_INET symbol and lets the compiler
      optimize the code out to avoid the link error.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 95850116
       ("bridge: Add support for IEEE 802.11 Proxy ARP")
      Cc: Kyeyoon Park <kyeyoonp@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  2. 13 Jan, 2015 6 commits
    • Jean-Francois Remy's avatar
      neighbour: fix base_reachable_time(_ms) not effective immediatly when changed · 4bf6980d
      Jean-Francois Remy authored
      When setting base_reachable_time or base_reachable_time_ms on a
      specific interface through sysctl or netlink, the reachable_time
      value is not updated.
      This means that neighbour entries will continue to be updated using the
      old value until it is recomputed in neigh_period_work (which
          recomputes the value every 300*HZ).
      On systems with HZ equal to 1000 for instance, it means 5mins before
      the change is effective.
      This patch changes this behavior by recomputing reachable_time after
      each set on base_reachable_time or base_reachable_time_ms.
      The new value will become effective the next time the neighbour's timer
      is triggered.
      Changes are made in two places: the netlink code for set and the sysctl
      handling code. For sysctl, I use a proc_handler. The ipv6 network
      code does provide its own handler but it already refreshes
      reachable_time correctly so it's not an issue.
      Any other user of neighbour which provide its own handlers must
      refresh reachable_time.
      Signed-off-by: default avatarJean-Francois Remy <jeff@melix.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Stefan Agner's avatar
      net: fec: fix MDIO bus assignement for dual fec SoC's · 3d125f9c
      Stefan Agner authored
      On i.MX28, the MDIO bus is shared between the two FEC instances.
      The driver makes sure that the second FEC uses the MDIO bus of the
      first FEC. This is done conditionally if FEC_QUIRK_ENET_MAC is set.
      However, in newer designs, such as Vybrid or i.MX6SX, each FEC MAC
      has its own MDIO bus. Simply removing the quirk FEC_QUIRK_ENET_MAC
      is not an option since other logic, triggered by this quirk, is
      still needed.
      Furthermore, there are board designs which use the same MDIO bus
      for both PHY's even though the second bus would be available on the
      SoC side. Such layout are popular since it saves pins on SoC side.
      Due to the above quirk, those boards currently do work fine. The
      boards in the mainline tree with such a layout are:
      - Freescale Vybrid Tower with TWR-SER2 (vf610-twr.dts)
      - Freescale i.MX6 SoloX SDB Board (imx6sx-sdb.dts)
      This patch adds a new quirk FEC_QUIRK_SINGLE_MDIO for i.MX28, which
      makes sure that the MDIO bus of the first FEC is used in any case.
      However, the boards above do have a SoC with a MDIO bus for each FEC
      instance. But the PHY's are not connected in a 1:1 configuration. A
      proper device tree description is needed to allow the driver to
      figure out where to find its PHY. This patch fixes that shortcoming
      by adding a MDIO bus child node to the first FEC instance, along
      with the two PHY's on that bus, and making use of the phy-handle
      property to add a reference to the PHY's.
      Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • David Vrabel's avatar
      xen-netfront: use different locks for Rx and Tx stats · 900e1833
      David Vrabel authored
      In netfront the Rx and Tx path are independent and use different
      locks.  The Tx lock is held with hard irqs disabled, but Rx lock is
      held with only BH disabled.  Since both sides use the same stats lock,
      a deadlock may occur.
        [ INFO: possible irq lock inversion dependency detected ]
        3.16.2 #16 Not tainted
        swapper/0/0 just changed the state of lock:
         (&(&queue->tx_lock)->rlock){-.....}, at: [<c03adec8>]
        but this lock took another, HARDIRQ-unsafe lock in the past:
        and interrupts could create inverse lock ordering between them.
        other info that might help us debug this:
         Possible interrupt unsafe locking scenario:
               CPU0                    CPU1
               ----                    ----
      Using separate locks for the Rx and Tx stats fixes this deadlock.
      Reported-by: default avatarDmitry Piotrovsky <piotrovskydmitry@gmail.com>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Mugunthan V N's avatar
      drivers: net: cpsw: fix multicast flush in dual emac mode · 25906052
      Mugunthan V N authored
      Since ALE table is a common resource for both the interfaces in Dual EMAC
      mode and while bringing up the second interface in cpsw_ndo_set_rx_mode()
      all the multicast entries added by the first interface is flushed out and
      only second interface multicast addresses are added. Fixing this by
      flushing multicast addresses based on dual EMAC port vlans which will not
      affect the other emac port multicast addresses.
      Fixes: d9ba8f9e
       (driver: net: ethernet: cpsw: dual emac interface implementation)
      Cc: <stable@vger.kernel.org> # v3.9+
      Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Hariprasad Shenai's avatar
      cxgb4vf: Initialize mdio_addr before using it · fd48e639
      Hariprasad Shenai authored
      In commit 5ad24def
       ("cxgb4vf: Fix ethtool get_settings for VF driver")
      mdio_addr of port_info structure was used unininitialzed. Fixing it.
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • B Viswanath's avatar
      net: Corrected the comment describing the ndo operations to reflect the actual... · 5d632cb7
      B Viswanath authored
      net: Corrected the comment describing the ndo operations to reflect the actual prototype for couple of operations
      Corrected the comment describing the ndo operations to
      reflect the actual prototype for couple of operations
      Signed-off-by: default avatarB Viswanath <marichika4@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  3. 12 Jan, 2015 6 commits
  4. 11 Jan, 2015 5 commits
  5. 08 Jan, 2015 4 commits
  6. 06 Jan, 2015 18 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · bdec4196
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Just a pile of random fixes, including:
         1) Do not apply TSO limits to non-TSO packets, fix from Herbert Xu.
         2) MDI{,X} eeprom check in e100 driver is reversed, from John W.
         3) Missing error return assignments in several ethernet drivers, from
            Julia Lawall.
         4) Altera TSE device doesn't come back up after ifconfig down/up
            sequence, fix from Kostya Belezko.
         5) Add more cases to the check for whether the qmi_wwan device has a
            bogus MAC address and needs to be assigned a random one.  From
            Kristian Evensen.
         6) Fix interrupt hangs in CPSW, from Felipe Balbi.
         7) Implement ndo_features_check in r8152 so that the stack doesn't
            feed GSO packets which are outside of the chip's capabilities.
            From Hayes Wang"
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits)
        qla3xxx: don't allow never end busy loop
        xen-netback: fixing the propagation of the transmit shaper timeout
        r8152: support ndo_features_check
        batman-adv: fix potential TT client + orig-node memory leak
        batman-adv: fix multicast counter when purging originators
        batman-adv: fix counter for multicast supporting nodes
        batman-adv: fix lock class for decoding hash in network-coding.c
        batman-adv: fix delayed foreign originator recognition
        batman-adv: fix and simplify condition when bonding should be used
        Revert "mac80211: Fix accounting of the tailroom-needed counter"
        net: ethernet: cpsw: fix hangs with interrupts
        enic: free all rq buffs when allocation fails
        qmi_wwan: Set random MAC on devices with buggy fw
        openvswitch: Consistently include VLAN header in flow and port stats.
        tcp: Do not apply TSO segment limit to non-TSO packets
        Altera TSE: Add missing phydev
        net/mlx4_core: Fix error flow in mlx4_init_hca()
        net/mlx4_core: Correcly update the mtt's offset in the MR re-reg flow
        qlcnic: Fix return value in qlcnic_probe()
        net: axienet: fix error return code
    • Linus Torvalds's avatar
      Merge tag 'for-linus-3' of git://git.code.sf.net/p/openipmi/linux-ipmi · 0adc1803
      Linus Torvalds authored
      Pull IPMI fixlet from Corey Minyard:
       "Fix a compile warning"
      * tag 'for-linus-3' of git://git.code.sf.net/p/openipmi/linux-ipmi:
        ipmi: Fix compile warning with tv_usec
    • Anjali Singhai's avatar
      i40e: Fix bug with TCP over IPv6 over VXLAN · df23075f
      Anjali Singhai authored
      The driver was examining the outer protocol layer to set the inner protocol
      layer checksum offload.  In the case of TCP over IPV6 over an IPv4 based
      VXLAN the inner checksum offloads would be set to look for IPv4/UDP instead
      of IPv6/TCP.  This code fixes that so that the driver will look at the
      proper layer for encapsulation offload settings.
      Signed-off-by: default avatarAnjali Singhai <anjali.singhai@intel.com>
      Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    • Anjali Singhai's avatar
      i40e: Fix Rx checksum error counter · f6385979
      Anjali Singhai authored
      The Rx port checksum error counter was incrementing incorrectly with
      UDP encapsulated tunneled traffic.  This patch fixes the problem so that
      the port_rx_csum counter will show accurate statistics.
      Signed-off-by: default avatarAnjali Singhai <anjali.singhai@intel.com>
      Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
      Tested-by: default avatarJim Young <james.m.young@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    • Jesse Brandeburg's avatar
      i40e: fix un-necessary Tx hangs · d91649f5
      Jesse Brandeburg authored
      When the driver was polling with interrupts disabled the hardware
      will occasionally not write back descriptors.  This patch causes
      the driver to detect this situation and force an interrupt to
      fire which will flush the stuck descriptor.  Does not conflict
      with napi because if we are already polling the napi_schedule is
      ignored.  Additionally the extra interrupts are rate limited, so
      don't cause a burden to the CPU.
      Change-ID: Iba4616d2a71288672a5f08e4512e2704b97335e8
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    • Andy Shevchenko's avatar
      qla3xxx: don't allow never end busy loop · 2abad79a
      Andy Shevchenko authored
      The counter variable wasn't increased at all which may stuck under
      certain circumstances.
      Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 3b421b80
      Linus Torvalds authored
      Pull ext4 bugfixes from Ted Ts'o:
       "Revert a potential seek_data/hole regression which shows up when using
        ext4 to handle ext3 file systems, plus two minor bug fixes"
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: remove spurious KERN_INFO from ext4_warning call
        Revert "ext4: fix suboptimal seek_{data,hole} extents traversial"
        ext4: prevent online resize with backup superblock
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: fix flush ruleset chain dependencies · a2f18db0
      Pablo Neira Ayuso authored
      Jumping between chains doesn't mix well with flush ruleset. Rules
      from a different chain and set elements may still refer to us.
      [  353.373791] ------------[ cut here ]------------
      [  353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
      [  353.373896] invalid opcode: 0000 [#1] SMP
      [  353.373942] Modules linked in: intel_powerclamp uas iwldvm iwlwifi
      [  353.374017] CPU: 0 PID: 6445 Comm: 31c3.nft Not tainted 3.18.0 #98
      [  353.374069] Hardware name: LENOVO 5129CTO/5129CTO, BIOS 6QET47WW (1.17 ) 07/14/2010
      [  353.375018] Call Trace:
      [  353.375046]  [<ffffffff81964c31>] ? nf_tables_commit+0x381/0x540
      [  353.375101]  [<ffffffff81949118>] nfnetlink_rcv+0x3d8/0x4b0
      [  353.375150]  [<ffffffff81943fc5>] netlink_unicast+0x105/0x1a0
      [  353.375200]  [<ffffffff8194438e>] netlink_sendmsg+0x32e/0x790
      [  353.375253]  [<ffffffff818f398e>] sock_sendmsg+0x8e/0xc0
      [  353.375300]  [<ffffffff818f36b9>] ? move_addr_to_kernel.part.20+0x19/0x70
      [  353.375357]  [<ffffffff818f44f9>] ? move_addr_to_kernel+0x19/0x30
      [  353.375410]  [<ffffffff819016d2>] ? verify_iovec+0x42/0xd0
      [  353.375459]  [<ffffffff818f3e10>] ___sys_sendmsg+0x3f0/0x400
      [  353.375510]  [<ffffffff810615fa>] ? native_sched_clock+0x2a/0x90
      [  353.375563]  [<ffffffff81176697>] ? acct_account_cputime+0x17/0x20
      [  353.375616]  [<ffffffff8110dc78>] ? account_user_time+0x88/0xa0
      [  353.375667]  [<ffffffff818f4bbd>] __sys_sendmsg+0x3d/0x80
      [  353.375719]  [<ffffffff81b184f4>] ? int_check_syscall_exit_work+0x34/0x3d
      [  353.375776]  [<ffffffff818f4c0d>] SyS_sendmsg+0xd/0x20
      [  353.375823]  [<ffffffff81b1826d>] system_call_fastpath+0x16/0x1b
      Release objects in this order: rules -> sets -> chains -> tables, to
      make sure no references to chains are held anymore.
      Reported-by: default avatarAsbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink: relax strict multicast group check from netlink_bind · 62924af2
      Pablo Neira Ayuso authored
      Relax the checking that was introduced in 97840cb6
      nfnetlink: fix insufficient validation in nfnetlink_bind") when the
      subscription bitmask is used. Existing userspace code code may request
      to listen to all of the existing netlink groups by setting an all to one
      subscription group bitmask. Netlink already validates subscription via
      setsockopt() for us.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink: validate nfnetlink header from batch · 9ea2aa8b
      Pablo Neira Ayuso authored
      Make sure there is enough room for the nfnetlink header in the
      netlink messages that are part of the batch. There is a similar
      check in netlink_rcv_skb().
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    • Pablo Neira Ayuso's avatar
      netfilter: conntrack: fix race between confirmation and flush · 8ca3f5e9
      Pablo Neira Ayuso authored
      Commit 5195c14c ("netfilter: conntrack: fix race in
      __nf_conntrack_confirm against get_next_corpse") aimed to resolve the
      race condition between the confirmation (packet path) and the flush
      command (from control plane). However, it introduced a crash when
      several packets race to add a new conntrack, which seems easier to
      reproduce when nf_queue is in place.
      Fix this race, in __nf_conntrack_confirm(), by removing the CT
      from unconfirmed list before checking the DYING bit. In case
      race occured, re-add the CT to the dying list
      This patch also changes the verdict from NF_ACCEPT to NF_DROP when
      we lose race. Basically, the confirmation happens for the first packet
      that we see in a flow. If you just invoked conntrack -F once (which
      should be the common case), then this is likely to be the first packet
      of the flow (unless you already called flush anytime soon in the past).
      This should be hard to trigger, but better drop this packet, otherwise
      we leave things in inconsistent state since the destination will likely
      reply to this packet, but it will find no conntrack, unless the origin
      The change of the verdict has been discussed in:
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    • Linus Torvalds's avatar
      mm: propagate error from stack expansion even for guard page · fee7e49d
      Linus Torvalds authored
      Jay Foad reports that the address sanitizer test (asan) sometimes gets
      confused by a stack pointer that ends up being outside the stack vma
      that is reported by /proc/maps.
      This happens due to an interaction between RLIMIT_STACK and the guard
      page: when we do the guard page check, we ignore the potential error
      from the stack expansion, which effectively results in a missing guard
      page, since the expected stack expansion won't have been done.
      And since /proc/maps explicitly ignores the guard page (commit
      : "mm: fix up some user-visible effects of the stack guard
      page"), the stack pointer ends up being outside the reported stack area.
      This is the minimal patch: it just propagates the error.  It also
      effectively makes the guard page part of the stack limit, which in turn
      measn that the actual real stack is one page less than the stack limit.
      Let's see if anybody notices.  We could teach acct_stack_growth() to
      allow an extra page for a grow-up/grow-down stack in the rlimit test,
      but I don't want to add more complexity if it isn't needed.
      Reported-and-tested-by: default avatarJay Foad <jay.foad@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • David S. Miller's avatar
      Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge · 627d2cc0
      David S. Miller authored
      Included changes:
      - ensure bonding is used (if enabled) for packets coming in the soft
      - fix race condition to avoid orig_nodes to be deleted right after
        being added
      - avoid false positive lockdep splats by assigning lockclass to
        the proper hashtable lock objects
      - avoid miscounting of multicast 'disabled' nodes in the network
      - fix memory leak in the Global Translation Table in case of
        originator interval change
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Palik, Imre's avatar
      xen-netback: fixing the propagation of the transmit shaper timeout · 07ff890d
      Palik, Imre authored
      Since e9ce7cb6
       ("xen-netback: Factor queue-specific data into queue struct"),
      the transimt shaper timeout is always set to 0.  The value the user sets via
      xenbus is never propagated to the transmit shaper.
      This patch fixes the issue.
      Cc: Anthony Liguori <aliguori@amazon.com>
      Signed-off-by: default avatarImre Palik <imrep@amazon.de>
      Acked-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • David S. Miller's avatar
      Merge tag 'mac80211-for-davem-2015-01-06' of... · 15ecf7a0
      David S. Miller authored
      Merge tag 'mac80211-for-davem-2015-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      Here's just a single fix - a revert of a patch that broke the
      p54 and cw2100 drivers (arguably due to bad assumptions there.)
      Since this affects kernels since 3.17, I decided to revert for
      now and we'll revisit this optimisation properly for -next.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • hayeswang's avatar
      r8152: support ndo_features_check · a5e31255
      hayeswang authored
      Support ndo_features_check to avoid:
       - the transport offset is more than the hw limitation when using hw checksum.
       - the skb->len of a GSO packet is more than the limitation.
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Linus Lüssing's avatar
      batman-adv: fix potential TT client + orig-node memory leak · 9d31b3ce
      Linus Lüssing authored
      This patch fixes a potential memory leak which can occur once an
      originator times out. On timeout the according global translation table
      entry might not get purged correctly. Furthermore, the non purged TT
      entry will cause its orig-node to leak, too. Which additionally can lead
      to the new multicast optimization feature not kicking in because of a
      therefore bogus counter.
      In detail: The batadv_tt_global_entry->orig_list holds the reference to
      the orig-node. Usually this reference is released after
      BATADV_PURGE_TIMEOUT through: _batadv_purge_orig()->
      batadv_tt_global_del_orig() which purges this global tt entry and
      releases the reference to the orig-node.
      However, if between two batadv_purge_orig_node() calls the orig-node
      timeout grew to 2*BATADV_PURGE_TIMEOUT then this call path isn't
      reached. Instead the according orig-node is removed from the
      originator hash in _batadv_purge_orig(), the batadv_update_route()
      part is skipped and won't be reached anymore.
      Fixing the issue by moving batadv_tt_global_del_orig() out of the rcu
      Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Acked-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
    • Linus Lüssing's avatar
      batman-adv: fix multicast counter when purging originators · a5164886
      Linus Lüssing authored
      When purging an orig_node we should only decrease counter tracking the
      number of nodes without multicast optimizations support if it was
      increased through this orig_node before.
      A not yet quite initialized orig_node (meaning it did not have its turn
      in the mcast-tvlv handler so far) which gets purged would not adhere to
      this and will lead to a counter imbalance.
      Fixing this by adding a check whether the orig_node is mcast-initalized
      before decreasing the counter in the mcast-orig_node-purging routine.
      Introduced by 60432d75
      ("batman-adv: Announce new capability via multicast TVLV")
      Reported-by: default avatarTobias Hachmer <tobias@hachmer.de>
      Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>