1. 10 May, 2016 9 commits
    • Elad Kanfi's avatar
      net: nps_enet: bug fix - handle lost tx interrupts · 05c00d82
      Elad Kanfi authored
      The tx interrupt is of edge type, and in case such interrupt is triggered
      while it is masked it will not be handled even after tx interrupts are
      re-enabled in the end of NAPI poll.
      This will cause tx network to stop in the following scenario:
       * Rx is being handled, hence interrupts are masked.
       * Tx interrupt is triggered after checking if there is some tx to handle
         and before re-enabling the interrupts.
      In this situation only rx transaction will release tx requests.
      
      In order to handle the tx that was missed( if there was one ),
      a NAPI reschdule was added after enabling the interrupts.
      Signed-off-by: default avatarElad Kanfi <eladkan@mellanox.com>
      Acked-by: default avatarNoam Camus <noamca@mellanox.com>
      Acked-by: default avatarGilad Ben-Yossef <giladby@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05c00d82
    • Elad Kanfi's avatar
      net: nps_enet: Tx handler synchronization · e5df49d5
      Elad Kanfi authored
      Below is a description of a possible problematic
      sequence. CPU-A is sending a frame and CPU-B handles
      the interrupt that indicates the frame was sent. CPU-B
      reads an invalid value of tx_packet_sent.
      
      	CPU-A				CPU-B
      	-----				-----
      	nps_enet_send_frame
      	.
      	.
      	tx_skb = skb
      	tx_packet_sent = true
      	order HW to start tx
      	.
      	.
      	HW complete tx
      			    ------> 	get tx complete interrupt
      					.
      					.
      					if(tx_packet_sent == true)
      						handle tx_skb
      
      	end memory transaction
      	(tx_packet_sent actually
      	 written)
      
      Furthermore there is a dependency between tx_skb and tx_packet_sent.
      There is no assurance that tx_skb contains a valid pointer at CPU B
      when it sees tx_packet_sent == true.
      
      Solution:
      
      Initialize tx_skb to NULL and use it to indicate that packet was sent,
      in this way tx_packet_sent can be removed.
      Add a write memory barrier after setting tx_skb in order to make sure
      that it is valid before HW is informed and IRQ is fired.
      
      Fixed sequence will be:
      
             CPU-A                           CPU-B
             -----                           -----
      
      	tx_skb = skb
      	wmb()
      	.
      	.
      	order HW to start tx
      	.
      	.
      	HW complete tx
      			------>		get tx complete interrupt
      					.
      					.
      					if(tx_skb != NULL)
      						handle tx_skb
      
      					tx_skb = NULL
      Signed-off-by: default avatarElad Kanfi <eladkan@mellanox.com>
      Acked-by: default avatarNoam Camus <noamca@mellanox.com>
      Acked-by: default avatarGilad Ben-Yossef <giladby@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5df49d5
    • Jamal Hadi Salim's avatar
      export tc ife uapi header · d99079e2
      Jamal Hadi Salim authored
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d99079e2
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-for-davem-2016-05-09' of... · 5e769ada
      David S. Miller authored
      Merge tag 'wireless-drivers-for-davem-2016-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      wireless-drivers fixes for 4.6
      
      iwlwifi
      
      * fix P2P rates (and possibly other issues)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e769ada
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · adc0a8bf
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contain Netfilter simple fixes for your net tree,
      two one-liner and one two-liner:
      
      1) Oneliner to fix missing spinlock definition that triggers
         'BUG: spinlock bad magic on CPU#' when spinlock debugging is enabled,
         from Florian Westphal.
      
      2) Fix missing workqueue cancelation on IDLETIMER removal,
         from Liping Zhang.
      
      3) Fix insufficient validation of netlink of NFACCT_QUOTA in
         nfnetlink_acct, from Phil Turnbull.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      adc0a8bf
    • xypron.glpk@gmx.de's avatar
      net: thunderx: avoid exposing kernel stack · 161de2ca
      xypron.glpk@gmx.de authored
      Reserved fields should be set to zero to avoid exposing
      bits from the kernel stack.
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      161de2ca
    • Kangjie Lu's avatar
      net: fix a kernel infoleak in x25 module · 79e48650
      Kangjie Lu authored
      Stack object "dte_facilities" is allocated in x25_rx_call_request(),
      which is supposed to be initialized in x25_negotiate_facilities.
      However, 5 fields (8 bytes in total) are not initialized. This
      object is then copied to userland via copy_to_user, thus infoleak
      occurs.
      Signed-off-by: default avatarKangjie Lu <kjlu@gatech.edu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79e48650
    • Geert Uytterhoeven's avatar
      ravb: Add missing free_irq() call to ravb_close() · 7fa816b9
      Geert Uytterhoeven authored
      When reopening the network device on ra7795/salvator-x, e.g. after a
      DHCP timeout:
      
          IP-Config: Reopening network devices...
          genirq: Flags mismatch irq 139. 00000000 (eth0:ch24:emac) vs. 00000000 (eth0:ch24:emac)
          ravb e6800000.ethernet eth0: cannot request IRQ eth0:ch24:emac
          IP-Config: Failed to open eth0
          IP-Config: No network devices available
      
      The "mismatch" is due to requesting an IRQ that is already in use,
      while IRQF_PROBE_SHARED wasn't set.
      
      However, the real cause is that ravb_close() doesn't release the R-Car
      Gen3-specific secondary IRQ.
      
      Add the missing free_irq() call to fix this.
      
      Fixes: 22d4df8f ("ravb: Add support for r8a7795 SoC")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7fa816b9
    • Mikko Rapeli's avatar
      uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h · 4a91cb61
      Mikko Rapeli authored
      glibc's net/if.h contains copies of definitions from linux/if.h and these
      conflict and cause build failures if both files are included by application
      source code. Changes in uapi headers, which fixed header file dependencies to
      include linux/if.h when it was needed, e.g. commit 1ffad83d, made the
      net/if.h and linux/if.h incompatibilities visible as build failures for
      userspace applications like iproute2 and xtables-addons.
      
      This patch fixes compile errors when glibc net/if.h is included before
      linux/if.h:
      
      ./linux/if.h:99:21: error: redeclaration of enumerator ‘IFF_NOARP’
      ./linux/if.h:98:23: error: redeclaration of enumerator ‘IFF_RUNNING’
      ./linux/if.h:97:26: error: redeclaration of enumerator ‘IFF_NOTRAILERS’
      ./linux/if.h:96:27: error: redeclaration of enumerator ‘IFF_POINTOPOINT’
      ./linux/if.h:95:24: error: redeclaration of enumerator ‘IFF_LOOPBACK’
      ./linux/if.h:94:21: error: redeclaration of enumerator ‘IFF_DEBUG’
      ./linux/if.h:93:25: error: redeclaration of enumerator ‘IFF_BROADCAST’
      ./linux/if.h:92:19: error: redeclaration of enumerator ‘IFF_UP’
      ./linux/if.h:252:8: error: redefinition of ‘struct ifconf’
      ./linux/if.h:203:8: error: redefinition of ‘struct ifreq’
      ./linux/if.h:169:8: error: redefinition of ‘struct ifmap’
      ./linux/if.h:107:23: error: redeclaration of enumerator ‘IFF_DYNAMIC’
      ./linux/if.h:106:25: error: redeclaration of enumerator ‘IFF_AUTOMEDIA’
      ./linux/if.h:105:23: error: redeclaration of enumerator ‘IFF_PORTSEL’
      ./linux/if.h:104:25: error: redeclaration of enumerator ‘IFF_MULTICAST’
      ./linux/if.h:103:21: error: redeclaration of enumerator ‘IFF_SLAVE’
      ./linux/if.h:102:22: error: redeclaration of enumerator ‘IFF_MASTER’
      ./linux/if.h:101:24: error: redeclaration of enumerator ‘IFF_ALLMULTI’
      ./linux/if.h:100:23: error: redeclaration of enumerator ‘IFF_PROMISC’
      
      The cases where linux/if.h is included before net/if.h need a similar fix in
      the glibc side, or the order of include files can be changed userspace
      code as a workaround.
      
      This change was tested in x86 userspace on Debian unstable with
      scripts/headers_compile_test.sh:
      
      $ make headers_install && \
        cd usr/include && ../../scripts/headers_compile_test.sh -l -k
      ...
      cc -Wall -c -nostdinc -I /usr/lib/gcc/i586-linux-gnu/5/include -I /usr/lib/gcc/i586-linux-gnu/5/include-fixed -I . -I /home/mcfrisk/src/linux-2.6/usr/headers_compile_test_include.2uX2zH -I /home/mcfrisk/src/linux-2.6/usr/headers_compile_test_include.2uX2zH/i586-linux-gnu -o /dev/null ./linux/if.h_libc_before_kernel.h
      PASSED libc before kernel test: ./linux/if.h
      Reported-by: default avatarJan Engelhardt <jengelh@inai.de>
      Reported-by: default avatarJosh Boyer <jwboyer@fedoraproject.org>
      Reported-by: default avatarStephen Hemminger <shemming@brocade.com>
      Reported-by: default avatarWaldemar Brodkorb <mail@waldemar-brodkorb.de>
      Cc: Gabriel Laskar <gabriel@lse.epita.fr>
      Signed-off-by: default avatarMikko Rapeli <mikko.rapeli@iki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a91cb61
  2. 09 May, 2016 11 commits
  3. 08 May, 2016 1 commit
  4. 07 May, 2016 10 commits
  5. 06 May, 2016 9 commits
    • Ido Schimmel's avatar
      mlxsw: spectrum: Add missing rollback in flood configuration · 28892865
      Ido Schimmel authored
      When we fail to set the flooding configuration for the broadcast and
      unregistered multicast traffic, we should revert the flooding
      configuration of the unknown unicast traffic.
      
      Fixes: 0293038e ("mlxsw: spectrum: Add support for flood control")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      28892865
    • Ido Schimmel's avatar
      mlxsw: spectrum: Fix rollback order in LAG join failure · 51554db2
      Ido Schimmel authored
      Make the leave procedure in the error path symmetric to the join
      procedure and first remove the port from the collector before
      potentially destroying the LAG.
      
      Fixes: 0d65fc13 ("mlxsw: spectrum: Implement LAG port join/leave")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51554db2
    • Jarno Rajahalme's avatar
      udp_offload: Set encapsulation before inner completes. · 229740c6
      Jarno Rajahalme authored
      UDP tunnel segmentation code relies on the inner offsets being set for
      an UDP tunnel GSO packet, but the inner *_complete() functions will
      set the inner offsets only if 'encapsulation' is set before calling
      them.  Currently, udp_gro_complete() sets 'encapsulation' only after
      the inner *_complete() functions are done.  This causes the inner
      offsets having invalid values after udp_gro_complete() returns, which
      in turn will make it impossible to properly segment the packet in case
      it needs to be forwarded, which would be visible to the user either as
      invalid packets being sent or as packet loss.
      
      This patch fixes this by setting skb's 'encapsulation' in
      udp_gro_complete() before calling into the inner complete functions,
      and by making each possible UDP tunnel gro_complete() callback set the
      inner_mac_header to the beginning of the tunnel payload.
      Signed-off-by: default avatarJarno Rajahalme <jarno@ovn.org>
      Reviewed-by: default avatarAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      229740c6
    • Jarno Rajahalme's avatar
      udp_tunnel: Remove redundant udp_tunnel_gro_complete(). · 43b8448c
      Jarno Rajahalme authored
      The setting of the UDP tunnel GSO type is already performed by
      udp[46]_gro_complete().
      Signed-off-by: default avatarJarno Rajahalme <jarno@ovn.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      43b8448c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 07837831
      Linus Torvalds authored
      Pull writeback fix from Jens Axboe:
       "Just a single fix for domain aware writeback, fixing a regression that
        can cause balance_dirty_pages() to keep looping while not getting any
        work done"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        writeback: Fix performance regression in wb_over_bg_thresh()
      07837831
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3f86ba5d
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "This contains two fixes: a boot fix for older SGI/UV systems, and an
        APIC calibration fix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO
        x86/platform/UV: Bring back the call to map_low_mmrs in uv_system_init
      3f86ba5d
    • Sudarsana Reddy Kalluru's avatar
      qede: prevent chip hang when increasing channels · 8e0ddc04
      Sudarsana Reddy Kalluru authored
      qede requires qed to provide enough resources to accommodate 16 combined
      channels, but that upper-bound isn't actually being enforced by it.
      Instead, qed inform back to qede how many channels can be opened based on
      available resources - but that calculation doesn't really take into account
      the resources requested by qede; Instead it considers other FW/HW available
      resources.
      
      As a result, if a user would increase the number of channels to more than
      16 [e.g., using ethtool] the chip would hang.
      
      This change increments the resources requested by qede to 64 combined
      channels instead of 16; This value is an upper bound on the possible
      available channels [due to other FW/HW resources].
      Signed-off-by: default avatarSudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e0ddc04
    • David Ahern's avatar
      net: ipv6: tcp reset, icmp need to consider L3 domain · 1d2f7b2d
      David Ahern authored
      Responses for packets to unused ports are getting lost with L3 domains.
      
      IPv4 has ip_send_unicast_reply for sending TCP responses which accounts
      for L3 domains; update the IPv6 counterpart tcp_v6_send_response.
      For icmp the L3 master check needs to be moved up in icmp6_send
      to properly respond to UDP packets to a port with no listener.
      
      Fixes: ca254490 ("net: Add VRF support to IPv6 stack")
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d2f7b2d
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 01ec7167
      Linus Torvalds authored
      Pull power management and ACPI fixes from Rafael Wysocki:
       "Fixes for problems introduced or discovered recently (intel_pstate,
        sti-cpufreq, ARM64 cpuidle, Operating Performance Points framework,
        generic device properties framework) and one fix for a hotplug-related
        deadlock in ACPICA that's been there forever, but is nasty enough.
      
        Specifics:
      
         - Fix for a recent regression in the intel_pstate driver causing it
           to fail to restore the HWP (HW-managed P-states) configuration of
           the boot CPU after suspend-to-RAM (Rafael Wysocki).
      
         - Fix for two recent regressions in the intel_pstate driver, one that
           can trigger a divide by zero if the driver is accessed via sysfs
           before it manages to take the first sample and one causing it to
           fail to update a structure field used in a trace point, so the
           information coming from it is less useful (Rafael Wysocki).
      
         - Fix for a problem in the sti-cpufreq driver introduced during the
           4.5 cycle that causes it to break CPU PM in multi-platform kernels
           by registering cpufreq-dt (which subsequently doesn't work)
           unconditionally and preventing the driver that would actually work
           from registering (Sudeep Holla).
      
         - Stable-candidate fix for an ARM64 cpuidle issue causing idle state
           usage counters to be incorrectly updated for idle states that were
           not entered due to errors (James Morse).
      
         - Fix for a recently introduced issue in the OPP (Operating
           Performance Points) framework causing it to print bogus error
           messages for missing optional regulators (Viresh Kumar).
      
         - Fix for a recently introduced issue in the generic device
           properties framework that may cause it to attempt to dereferece and
           invalid pointer in some cases (Heikki Krogerus).
      
         - Fix for a deadlock in the ACPICA core that may be triggered by
           device (eg Thunderbolt) hotplug (Prarit Bhargava)"
      
      * tag 'pm+acpi-4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / OPP: Remove useless check
        ACPICA: Dispatcher: Update thread ID for recursive method calls
        intel_pstate: Fix intel_pstate_get()
        cpufreq: intel_pstate: Fix HWP on boot CPU after system resume
        cpufreq: st: enable selective initialization based on the platform
        ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value
        device property: Avoid potential dereferences of invalid pointers
      01ec7167