1. 13 Jan, 2015 3 commits
  2. 12 Jan, 2015 11 commits
  3. 09 Jan, 2015 4 commits
  4. 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
  5. 06 Jan, 2015 17 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
    • Martin Hundebøll's avatar
      batman-adv: fix lock class for decoding hash in network-coding.c · f44d5407
      Martin Hundebøll authored
      batadv_has_set_lock_class() is called with the wrong hash table as first
      argument (probably due to a copy-paste error), which leads to false
      positives when running with lockdep.
      
      Introduced-by: 612d2b4f
      ("batman-adv: network coding - save overheard and tx packets for decoding")
      Signed-off-by: default avatarMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
      f44d5407
    • Linus Lüssing's avatar
      batman-adv: fix delayed foreign originator recognition · 2c667a33
      Linus Lüssing authored
      Currently it can happen that the reception of an OGM from a new
      originator is not being accepted. More precisely it can happen that
      an originator struct gets allocated and initialized
      (batadv_orig_node_new()), even the TQ gets calculated and set correctly
      (batadv_iv_ogm_calc_tq()) but still the periodic orig_node purging
      thread will decide to delete it if it has a chance to jump between
      these two function calls.
      
      This is because batadv_orig_node_new() initializes the last_seen value
      to zero and its caller (batadv_iv_ogm_orig_get()) makes it visible to
      other threads by adding it to the hash table already.
      batadv_iv_ogm_calc_tq() will set the last_seen variable to the correct,
      current time a few lines later but if the purging thread jumps in between
      that it will think that the orig_node timed out and will wrongly
      schedule it for deletion already.
      
      If the purging interval is the same as the originator interval (which is
      the default: 1 second), then this game can continue for several rounds
      until the random OGM jitter added enough difference between these
      two (in tests, two to about four rounds seemed common).
      
      Fixing this by initializing the last_seen variable of an orig_node
      to the current time before adding it to the hash table.
      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>
      2c667a33
    • Simon Wunderlich's avatar
      batman-adv: fix and simplify condition when bonding should be used · 329887ad
      Simon Wunderlich authored
      The current condition actually does NOT consider bonding when the
      interface the packet came in from is the soft interface, which is the
      opposite of what it should do (and the comment describes). Fix that and
      slightly simplify the condition.
      Reported-by: default avatarRay Gibson <booray@gmail.com>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
      329887ad