1. 14 Jan, 2015 2 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>
      4bf6980d
    • 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>
      3d125f9c
  2. 13 Jan, 2015 4 commits
  3. 12 Jan, 2015 11 commits
  4. 09 Jan, 2015 4 commits
  5. 07 Jan, 2015 5 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.
            Linville.
      
         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
        ...
      bdec4196
    • 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
      0adc1803
    • 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>
      df23075f
    • 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>
      f6385979
    • 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>
      d91649f5
  6. 06 Jan, 2015 14 commits
    • 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>
      2abad79a
    • 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
      3b421b80
    • 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>
      a2f18db0
    • 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 ("netfilter:
      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>
      62924af2
    • 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>
      9ea2aa8b
    • 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
      retransmits.
      
      The change of the verdict has been discussed in:
      https://www.marc.info/?l=linux-netdev&m=141588039530056&w=2Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      8ca3f5e9
    • 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
      d7824370: "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>
      fee7e49d
    • 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
        interface
      - 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>
      627d2cc0
    • 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>
      07ff890d
    • 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>
      15ecf7a0
    • 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>
      a5e31255
    • 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_purge_orig_node()->batadv_update_route()->_batadv_update_route()->
      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
      callback.
      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>
      9d31b3ce
    • 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>
      a5164886
    • Linus Lüssing's avatar
      batman-adv: fix counter for multicast supporting nodes · e8829f00
      Linus Lüssing authored
      A miscounting of nodes having multicast optimizations enabled can lead
      to multicast packet loss in the following scenario:
      
      If the first OGM a node receives from another one has no multicast
      optimizations support (no multicast tvlv) then we are missing to
      increase the counter. This potentially leads to the wrong assumption
      that we could safely use multicast optimizations.
      
      Fixings this by increasing the counter if the initial OGM has the
      multicast TVLV unset, too.
      
      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>
      e8829f00