Skip to content
  1. Nov 03, 2016
    • Tetsuo Handa's avatar
      sched/core: Fix oops in sched_show_task() · 38200502
      Tetsuo Handa authored
      
      
      When CONFIG_THREAD_INFO_IN_TASK=y, it is possible that an exited thread
      remains in the task list after its stack pointer was already set to NULL.
      
      Therefore, thread_saved_pc() and stack_not_used() in sched_show_task()
      will trigger NULL pointer dereference if an attempt to dump such thread's
      traces (e.g. SysRq-t, khungtaskd) is made.
      
      Since show_stack() in sched_show_task() calls try_get_task_stack() and
      sched_show_task() is called from interrupt context, calling
      try_get_task_stack() from sched_show_task() will be safe as well.
      
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Acked-by: default avatarAndy Lutomirski <luto@kernel.org>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: bp@alien8.de
      Cc: brgerst@gmail.com
      Cc: jann@thejh.net
      Cc: keescook@chromium.org
      Cc: linux-api@vger.kernel.org
      Cc: tycho.andersen@canonical.com
      Link: http://lkml.kernel.org/r/201611021950.FEJ34368.HFFJOOMLtQOVSF@I-love.SAKURA.ne.jp
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      38200502
  2. Nov 01, 2016
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 0c183d92
      Linus Torvalds authored
      Pull spi fixes from Mark Brown: "A few small fixes for SPI, one core fix
        that only applies in cases where we're handling DT overlays and a
        couple of driver specific fixes:
      
         - Fix handling of error cases when instantiating DT overlays so we
           don't end up just ignoring devices that encountered an error during
           instantiation.
      
         - Avoid reading uninitialized data when handing spurious interrupts
           in the espi driver.
      
         - A driver specific fix for the dspi driver to fix a bad interaction
           with u-boot"
      
      * tag 'spi-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: dspi: clear SPI_SR before enable interrupt
        spi: fsl-espi: avoid processing uninitalized data on error
        spi: mark device nodes only in case of successful instantiation
      0c183d92
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v4.9-rc3' of... · 3f7b55b6
      Linus Torvalds authored
      Merge tag 'regulator-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fix from Mark Brown:
       "Fix ramp_delay warnings for v4.9
      
        A new warning was introduced for missing information about the time
        that regulators take to power on in v4.9. This is in theory a real
        issue but for most practical regulators the communication overhead of
        talking to the device is greater than the ramp time so a lot of
        drivers don't set it and the warning is far too noisy without
        identifying practical issues.
      
        Just remove the warning for now"
      
      * tag 'regulator-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: core: silence warning: "VDD1: ramp_delay not set"
      3f7b55b6
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 80a306d6
      Linus Torvalds authored
      Pull regmap fixes from Mark Brown:
       "A couple of small build fixes here, nothing major.
      
        The missing include is triggered in some configurations and the
        renaming of ret is defensive for the benefit of some drivers people
        are in the process of mainlining"
      
      * tag 'regmap-fix-v4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: Rename ret variable in regmap_read_poll_timeout
        regmap: include <linux/delay.h> from include/linux/regmap.h
      80a306d6
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 6eb3c604
      Linus Torvalds authored
      Pull TPM fix from James Morris.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        tpm: remove invalid min length check from tpm_do_selftest()
      6eb3c604
  3. Oct 31, 2016
    • Jarkko Sakkinen's avatar
      tpm: remove invalid min length check from tpm_do_selftest() · befd9965
      Jarkko Sakkinen authored
      Removal of this check was not properly amended to the original commit.
      
      Cc: stable@vger.kernel.org
      Fixes: 0c541332
      
       ("tpm: use tpm_pcr_read_dev() in tpm_do_selftest()")
      Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      befd9965
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · 41ec793d
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A fix for a regression on ARMv4T CPUs, and wiring up the new pkey
        syscalls for ARM"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: wire up new pkey syscalls
        ARM: fix oops when using older ARMv4T CPUs
      41ec793d
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 04ed7d9c
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
       "Several sparc64 bug fixes here:
      
        1) Make the user copy routines on sparc64 return a properly accurate
           residual length when an exception occurs.
      
        2) We can get enormous kernel TLB range flush requests from vmalloc
           unmaps, so handle these more gracefully by doing full flushes
           instead of going page-by-page.
      
        3) Cope properly with negative branch offsets in sparc jump-label
           support, from James Clarke.
      
        4) Some old-style decl GCC warning fixups from Tobias Klauser"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Handle extremely large kernel TLB range flushes more gracefully.
        sparc64: Fix illegal relative branches in hypervisor patched TLB cross-call code.
        sparc64: Fix instruction count in comment for __hypervisor_flush_tlb_pending.
        sparc64: Handle extremely large kernel TSB range flushes sanely.
        sparc: Handle negative offsets in arch_jump_label_transform
        sparc64: Fix illegal relative branches in hypervisor patched TLB code.
        sparc64: Delete now unused user copy fixup functions.
        sparc64: Delete now unused user copy assembler helpers.
        sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.
        sparc64: Convert NG2copy_{from,to}_user to accurate exception reporting.
        sparc64: Convert NGcopy_{from,to}_user to accurate exception reporting.
        sparc64: Convert NG4copy_{from,to}_user to accurate exception reporting.
        sparc64: Convert U1copy_{from,to}_user to accurate exception reporting.
        sparc64: Convert GENcopy_{from,to}_user to accurate exception reporting.
        sparc64: Convert copy_in_user to accurate exception reporting.
        sparc64: Prepare to move to more saner user copy exception handling.
        sparc64: Delete __ret_efault.
        sparc32: Fix old style declaration GCC warnings
        sparc64: Fix old style declaration GCC warnings
        sparc64: Setup a scheduling domain for highest level cache.
      04ed7d9c
  4. Oct 30, 2016
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 2a26d99b
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Lots of fixes, mostly drivers as is usually the case.
      
         1) Don't treat zero DMA address as invalid in vmxnet3, from Alexey
            Khoroshilov.
      
         2) Fix element timeouts in netfilter's nft_dynset, from Anders K.
            Pedersen.
      
         3) Don't put aead_req crypto struct on the stack in mac80211, from
            Ard Biesheuvel.
      
         4) Several uninitialized variable warning fixes from Arnd Bergmann.
      
         5) Fix memory leak in cxgb4, from Colin Ian King.
      
         6) Fix bpf handling of VLAN header push/pop, from Daniel Borkmann.
      
         7) Several VRF semantic fixes from David Ahern.
      
         8) Set skb->protocol properly in ip6_tnl_xmit(), from Eli Cooper.
      
         9) Socket needs to be locked in udp_disconnect(), from Eric Dumazet.
      
        10) Div-by-zero on 32-bit fix in mlx4 driver, from Eugenia Emantayev.
      
        11) Fix stale link state during failover in NCSCI driver, from Gavin
            Shan.
      
        12) Fix netdev lower adjacency list traversal, from Ido Schimmel.
      
        13) Propvide proper handle when emitting notifications of filter
            deletes, from Jamal Hadi Salim.
      
        14) Memory leaks and big-endian issues in rtl8xxxu, from Jes Sorensen.
      
        15) Fix DESYNC_FACTOR handling in ipv6, from Jiri Bohac.
      
        16) Several routing offload fixes in mlxsw driver, from Jiri Pirko.
      
        17) Fix broadcast sync problem in TIPC, from Jon Paul Maloy.
      
        18) Validate chunk len before using it in SCTP, from Marcelo Ricardo
            Leitner.
      
        19) Revert a netns locking change that causes regressions, from Paul
            Moore.
      
        20) Add recursion limit to GRO handling, from Sabrina Dubroca.
      
        21) GFP_KERNEL in irq context fix in ibmvnic, from Thomas Falcon.
      
        22) Avoid accessing stale vxlan/geneve socket in data path, from
            Pravin Shelar"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (189 commits)
        geneve: avoid using stale geneve socket.
        vxlan: avoid using stale vxlan socket.
        qede: Fix out-of-bound fastpath memory access
        net: phy: dp83848: add dp83822 PHY support
        enic: fix rq disable
        tipc: fix broadcast link synchronization problem
        ibmvnic: Fix missing brackets in init_sub_crq_irqs
        ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context
        Revert "ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context"
        arch/powerpc: Update parameters for csum_tcpudp_magic & csum_tcpudp_nofold
        net/mlx4_en: Save slave ethtool stats command
        net/mlx4_en: Fix potential deadlock in port statistics flow
        net/mlx4: Fix firmware command timeout during interrupt test
        net/mlx4_core: Do not access comm channel if it has not yet been initialized
        net/mlx4_en: Fix panic during reboot
        net/mlx4_en: Process all completions in RX rings after port goes up
        net/mlx4_en: Resolve dividing by zero in 32-bit system
        net/mlx4_core: Change the default value of enable_qos
        net/mlx4_core: Avoid setting ports to auto when only one port type is supported
        net/mlx4_core: Fix the resource-type enum in res tracker to conform to FW spec
        ...
      2a26d99b
    • pravin shelar's avatar
      geneve: avoid using stale geneve socket. · fceb9c3e
      pravin shelar authored
      
      
      This patch is similar to earlier vxlan patch.
      Geneve device close operation frees geneve socket. This
      operation can race with geneve-xmit function which
      dereferences geneve socket. Following patch uses RCU
      mechanism to avoid this situation.
      
      Signed-off-by: default avatarPravin B Shelar <pshelar@ovn.org>
      Acked-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fceb9c3e
    • pravin shelar's avatar
      vxlan: avoid using stale vxlan socket. · c6fcc4fc
      pravin shelar authored
      
      
      When vxlan device is closed vxlan socket is freed. This
      operation can race with vxlan-xmit function which
      dereferences vxlan socket. Following patch uses RCU
      mechanism to avoid this situation.
      
      Signed-off-by: default avatarPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6fcc4fc
    • Mintz, Yuval's avatar
      qede: Fix out-of-bound fastpath memory access · 087892d2
      Mintz, Yuval authored
      
      
      Driver allocates a shadow array for transmitted SKBs with X entries;
      That means valid indices are {0,...,X - 1}. [X == 8191]
      Problem is the driver also uses X as a mask for a
      producer/consumer in order to choose the right entry in the
      array which allows access to entry X which is out of bounds.
      
      To fix this, simply allocate X + 1 entries in the shadow array.
      
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      087892d2
    • Roger Quadros's avatar
      net: phy: dp83848: add dp83822 PHY support · 30347834
      Roger Quadros authored
      
      
      This PHY has a compatible register set with DP83848x so
      add support for it.
      
      Acked-by: default avatarAndrew F. Davis <afd@ti.com>
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      30347834
    • Govindarajulu Varadarajan's avatar
      enic: fix rq disable · 9fe1c98a
      Govindarajulu Varadarajan authored
      
      
      When MTU is changed from 9000 to 1500 while there is burst of inbound 9000
      bytes packets, adaptor sometimes delivers 9000 bytes packets to 1500 bytes
      buffers. This causes memory corruption and sometimes crash.
      
      This is because of a race condition in adaptor between "RQ disable"
      clearing descriptor mini-cache and mini-cache valid bit being set by
      completion of descriptor fetch. This can result in stale RQ desc being
      cached and used when packets arrive. In this case, the stale descriptor
      have old MTU value.
      
      Solution is to write RQ->disable twice. The first write will stop any
      further desc fetches, allowing the second disable to clear the mini-cache
      valid bit without danger of a race.
      
      Also, the check for rq->running becoming 0 after writing rq->enable to 0
      is not done properly. When incoming packets are flooding the interface,
      rq->running will pulse high for each dropped packet. Since the driver was
      waiting for 10us between each poll, it is possible to see rq->running = 1
      1000 times in a row, even though it is not actually stuck running.
      This results in false failure of vnic_rq_disable(). Fix is to try more
      than 1000 time without delay between polls to ensure we do not miss when
      running goes low.
      
      In old adaptors rq->enable needs to be re-written to 0 when posted_index
      is reset in vnic_rq_clean() in order to keep rq->prefetch_index in sync.
      
      Signed-off-by: default avatarGovindarajulu Varadarajan <_govind@gmx.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9fe1c98a
    • Jon Paul Maloy's avatar
      tipc: fix broadcast link synchronization problem · 06bd2b1e
      Jon Paul Maloy authored
      In commit 2d18ac4b
      
       ("tipc: extend broadcast link initialization
      criteria") we tried to fix a problem with the initial synchronization
      of broadcast link acknowledge values. Unfortunately that solution is
      not sufficient to solve the issue.
      
      We have seen it happen that LINK_PROTOCOL/STATE packets with a valid
      non-zero unicast acknowledge number may bypass BCAST_PROTOCOL
      initialization, NAME_DISTRIBUTOR and other STATE packets with invalid
      broadcast acknowledge numbers, leading to premature opening of the
      broadcast link. When the bypassed packets finally arrive, they are
      inadvertently accepted, and the already correctly initialized
      acknowledge number in the broadcast receive link is overwritten by
      the invalid (zero) value of the said packets. After this the broadcast
      link goes stale.
      
      We now fix this by marking the packets where we know the acknowledge
      value is or may be invalid, and then ignoring the acks from those.
      
      To this purpose, we claim an unused bit in the header to indicate that
      the value is invalid. We set the bit to 1 in the initial BCAST_PROTOCOL
      synchronization packet and all initial ("bulk") NAME_DISTRIBUTOR
      packets, plus those LINK_PROTOCOL packets sent out before the broadcast
      links are fully synchronized.
      
      This minor protocol update is fully backwards compatible.
      
      Reported-by: default avatarJohn Thompson <thompa.atl@gmail.com>
      Tested-by: default avatarJohn Thompson <thompa.atl@gmail.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      06bd2b1e
    • Thomas Falcon's avatar
    • Thomas Falcon's avatar
      ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context · 9888d7b0
      Thomas Falcon authored
      
      
      Schedule these XPORT event tasks in the shared workqueue
      so that IRQs are not freed in an interrupt context when
      sub-CRQs are released.
      
      Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9888d7b0
    • David S. Miller's avatar
      Revert "ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context" · dbc34e73
      David S. Miller authored
      This reverts commit 8d7533e5
      
      .
      
      It introduced kbuild failures, new version coming.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dbc34e73
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue · 4c96f5b1
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2016-10-27
      
      This series contains fixes to ixgbe and i40e.
      
      Emil fixes a NULL pointer dereference when a macvlan interface is brought
      up while the PF is still down.
      
      David root caused the original panic that was fixed by commit id
      (a036244c
      
       "i40e: Fix kernel panic on enable/disable LLDP") and the
      fix was not quite correct, so removed the get_default_tc() and replaced
      it with a #define since there is only one TC supported as a default.
      
      Guilherme Piccoli fixes an issue where if we modprobe the driver module
      without enough MSI-X interrupts, then unload the module and reload it
      again, the kernel would crash.  So if we fail to allocate enough MSI-X
      interrupts, we should disable them since they were previously enabled.
      
      Huaibin Wang found that the order of the arguments for
      ndo_dflt_bridge_getlink() were in the correct order, so fix the order.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c96f5b1
    • Ivan Vecera's avatar
      arch/powerpc: Update parameters for csum_tcpudp_magic & csum_tcpudp_nofold · f9d4286b
      Ivan Vecera authored
      Commit 01cfbad7 "ipv4: Update parameters for csum_tcpudp_magic to their
      original types" changed parameters for csum_tcpudp_magic and
      csum_tcpudp_nofold for many platforms but not for PowerPC.
      
      Fixes: 01cfbad7
      
       "ipv4: Update parameters for csum_tcpudp_magic to their original types"
      Cc: Alexander Duyck <aduyck@mirantis.com>
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Acked-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9d4286b
    • Linus Torvalds's avatar
      Linux 4.9-rc3 · a909d3e6
      Linus Torvalds authored
      a909d3e6
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 42fd2b50
      Linus Torvalds authored
      Pull x86 bugfix from Thomas Gleixner:
       "A single bugfix for the recent changes related to registering the boot
        cpu when this has not happened before prefill_possible_map().
      
        The main problem with this change got fixed already, but we missed the
        case where the local APIC is not yet mapped, when prefill_possible_map()
        is invoked, so the registration of the boot cpu which has the APIC bit
        set in CPUID will explode.
      
        I should have seen that issue earlier, but all I can do now is feeling
        embarassed"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/smpboot: Init apic mapping before usage
      42fd2b50
    • David S. Miller's avatar
      Merge branch 'mlx4-fixes' · e59cc767
      David S. Miller authored
      Tariq Toukan says:
      
      ====================
      mlx4 misc fixes for 4.9
      
      This patchset contains several bug fixes from the team to the
      mlx4 Eth and Core drivers.
      
      Series generated against net commit:
      ecc515d7
      
       'sctp: fix the panic caused by route update'
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e59cc767
    • Tariq Toukan's avatar
      net/mlx4_en: Save slave ethtool stats command · eb4b6788
      Tariq Toukan authored
      
      
      Following the previous patch, as an optimization, the slave will
      not even bother sending the DUMP_ETH_STATS command over the
      comm channel.
      
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb4b6788
    • Jack Morgenstein's avatar
      net/mlx4_en: Fix potential deadlock in port statistics flow · d2582a03
      Jack Morgenstein authored
      mlx4_en_DUMP_ETH_STATS took the *counter mutex* and then
      called the FW command, with WRAPPED attribute. As a result, the fw command
      is wrapped on the Hypervisor when it calls mlx4_en_DUMP_ETH_STATS.
      The FW command wrapper flow on the hypervisor takes the *slave_cmd_mutex*
      during processing.
      
      At the same time, a VF could be in the process of coming up, and could
      call mlx4_QUERY_FUNC_CAP.  On the hypervisor, the command flow takes the
      *slave_cmd_mutex*, then executes mlx4_QUERY_FUNC_CAP_wrapper.
      mlx4_QUERY_FUNC_CAP wrapper calls mlx4_get_default_counter_index(),
      which takes the *counter mutex*. DEADLOCK.
      
      The fix is that the DUMP_ETH_STATS fw command should be called with
      the NATIVE attribute, so that on the hypervisor, this command does not
      enter the wrapper flow.
      
      Since the Hypervisor no longer goes through the wrapper code, we also
      simply return 0 in mlx4_DUMP_ETH_STATS_wrapper (i.e.the function succeeds,
      but the returned data will be all zeroes).
      No need to test if it is the Hypervisor going through the wrapper.
      
      Fixes: f9baff50
      
       ("mlx4_core: Add "native" argument to mlx4_cmd ...")
      Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2582a03
    • Eugenia Emantayev's avatar
      net/mlx4: Fix firmware command timeout during interrupt test · 6f2e0d2c
      Eugenia Emantayev authored
      
      
      Currently interrupt test that is part of ethtool selftest runs the
      check over all interrupt vectors of the device.
      In mlx4_en package part of interrupt vectors are uninitialized since
      mlx4_ib doesn't exist. This causes NOP FW command to time out.
      Change logic to test current port interrupt vectors only.
      
      Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f2e0d2c
    • Jack Morgenstein's avatar
      net/mlx4_core: Do not access comm channel if it has not yet been initialized · 81d18419
      Jack Morgenstein authored
      In the Hypervisor, there are several FW commands which are invoked
      before the comm channel is initialized (in mlx4_multi_func_init).
      These include MOD_STAT_CONFIG, QUERY_DEV_CAP, INIT_HCA, and others.
      
      If any of these commands fails, say with a timeout, the Hypervisor
      driver enters the internal error reset flow. In this flow, the driver
      attempts to notify all slaves via the comm channel that an internal error
      has occurred.
      
      Since the comm channel has not yet been initialized (i.e., mapped via
      ioremap), this will cause dereferencing a NULL pointer.
      
      To fix this, do not access the comm channel in the internal error flow
      if it has not yet been initialized.
      
      Fixes: 55ad3592 ("net/mlx4_core: Enable device recovery flow with SRIOV")
      Fixes: ab9c17a0
      
       ("mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet")
      Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81d18419
    • Eugenia Emantayev's avatar
      net/mlx4_en: Fix panic during reboot · 9d2afba0
      Eugenia Emantayev authored
      Fix a kernel panic that occurs as a result of an asynchronous event
      handled in roce_gid_mgmt:
      mlx4_en_get_drvinfo is called and accesses freed resources.
      
      This happens in a shutdown flow only, since pci device is destroyed
      while netdevice is still alive.
      
      Fixes: c27a02cd
      
       ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC")
      Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d2afba0
    • Erez Shitrit's avatar
      net/mlx4_en: Process all completions in RX rings after port goes up · 8d59de8f
      Erez Shitrit authored
      Currently there is a race between incoming traffic and
      initialization flow. HW is able to receive the packets
      after INIT_PORT is done and unicast steering is configured.
      Before we set priv->port_up NAPI is not scheduled and
      receive queues become full. Therefore we never get
      new interrupts about the completions.
      This issue could happen if running heavy traffic during
      bringing port up.
      The resolution is to schedule NAPI once port_up is set.
      If receive queues were full this will process all cqes
      and release them.
      
      Fixes: c27a02cd
      
       ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC")
      Signed-off-by: default avatarErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d59de8f
    • Eugenia Emantayev's avatar
      net/mlx4_en: Resolve dividing by zero in 32-bit system · 4850cf45
      Eugenia Emantayev authored
      When doing roundup_pow_of_two for large enough number with
      bit 31, an overflow will occur and a value equal to 1 will
      be returned. In this case 1 will be subtracted from the return
      value and division by zero will be reached.
      
      Fixes: 31c128b6
      
       ("net/mlx4_en: Choose time-stamping shift value according to HW frequency")
      Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4850cf45
    • Moshe Lazer's avatar
      net/mlx4_core: Change the default value of enable_qos · 72da2e91
      Moshe Lazer authored
      Change the default status of quality of service back to disabled,
      as it hurts performance in some cases.
      
      Fixes: 38438f7c
      
       ("net/mlx4: Set enhanced QoS support by default when ...")
      Signed-off-by: default avatarMoshe Lazer <moshel@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72da2e91
    • Maor Gottlieb's avatar
      net/mlx4_core: Avoid setting ports to auto when only one port type is supported · 33a1f8b1
      Maor Gottlieb authored
      When only one port type is supported, it should be read only.
      We reject changing requests, even to the auto sense mode.
      
      Fixes: 27bf91d6
      
       ("mlx4_core: Add link type autosensing")
      Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33a1f8b1
    • Jack Morgenstein's avatar
      net/mlx4_core: Fix the resource-type enum in res tracker to conform to FW spec · aa0c08fe
      Jack Morgenstein authored
      The resource type enum in the resource tracker was incorrect.
      RES_EQ was put in the position of RES_NPORT_ID (a FC resource).
      
      Since the remaining resources maintain their current values,
      and RES_EQ is not passed from slaves to the hypervisor in any
      FW command, this change affects only the hypervisor.
      Therefore, there is no backwards-compatibility issue.
      
      Fixes: 623ed84b
      
       ("mlx4_core: initial header-file changes for SRIOV support")
      Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa0c08fe
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifs · efa56375
      Linus Torvalds authored
      Pull ubi/ubifs fixes from Richard Weinberger:
       "This contains fixes for issues in both UBI and UBIFS:
      
         - A regression wrt overlayfs, introduced in -rc2.
         - An UBI issue, found by Dan Carpenter's static checker"
      
      * tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifs:
        ubifs: Fix regression in ubifs_readdir()
        ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap()
      efa56375
    • shamir rabinovitch's avatar
      rds: debug messages are enabled by default · ff57087f
      shamir rabinovitch authored
      
      
      rds use Kconfig option called "RDS_DEBUG" to enable rds debug messages.
      This option cause the rds Makefile to add -DDEBUG to the rds gcc command
      line.
      
      When CONFIG_DYNAMIC_DEBUG is enabled, the "DEBUG" macro is used by
      include/linux/dynamic_debug.h to decide if dynamic debug prints should
      be sent by default to the kernel log.
      
      rds should not enable this macro for production builds. rds dynamic
      debug work as expected follow this fix.
      
      Signed-off-by: default avatarShamir Rabinovitch <shamir.rabinovitch@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Reviewed-by: default avatarWengang Wang <wen.gang.wang@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff57087f
    • David S. Miller's avatar
      Merge tag 'mac80211-for-davem-2016-10-27' of... · 880b583c
      David S. Miller authored
      
      Merge tag 'mac80211-for-davem-2016-10-27' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      
      Johannes Berg says:
      
      ====================
      Just two fixes:
       * a fix to process all events while suspending, so any
         potential calls into the driver are done before it is
         suspended
       * small markup fixes for the sphinx documentation conversion
         that's coming into the tree via the doc tree
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      880b583c
    • Thomas Falcon's avatar
      ibmvnic: Fix releasing of sub-CRQ IRQs in interrupt context · 8d7533e5
      Thomas Falcon authored
      
      
      Schedule these XPORT event tasks in the shared workqueue
      so that IRQs are not freed in an interrupt context when
      sub-CRQs are released.
      
      Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d7533e5
    • Jason Gunthorpe's avatar
      net: mv643xx_eth: Fetch the phy connection type from DT · fd33b244
      Jason Gunthorpe authored
      
      
      The MAC is capable of RGMII mode and that is probably a more typical
      connection type than GMII today (eg it is used by Marvell Reference
      designs for several SOCs). Let DT users specify the standard
      
         phy-connection-type = "rgmii-id";
      
      On a phy node.
      
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd33b244
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 2674235f
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "We haven't seen a whole lot of fixes for the first two weeks since the
        merge window, but here is the batch that we have at the moment.
      
        Nothing sticks out as particularly bad or scary, it's mostly a handful
        of smaller fixes to several platforms. The Uniphier reset controller
        changes could probably have been delayed to 4.10, but they're not
        scary and just plumbing up driver changes that went in during the
        merge window.
      
        We're also adding another maintainer to Marvell Berlin platforms, to
        help out when Sebastian is too busy. Yay teamwork!"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: imx: mach-imx6q: Fix the PHY ID mask for AR8031
        ARM: dts: vf610: fix IRQ flag of global timer
        ARM: imx: gpc: Fix the imx_gpc_genpd_init() error path
        ARM: imx: gpc: Initialize all power domains
        arm64: dts: Updated NAND DT properties for NS2 SVK
        arm64: dts: uniphier: change MIO node to SD control node
        ARM: dts: uniphier: change MIO node to SD control node
        reset: uniphier: rename MIO reset to SD reset for Pro5, PXs2, LD20 SoCs
        arm64: uniphier: select ARCH_HAS_RESET_CONTROLLER
        ARM: uniphier: select ARCH_HAS_RESET_CONTROLLER
        arm64: dts: Add timer erratum property for LS2080A and LS1043A
        arm64: dts: rockchip: remove the abuse of keep-power-in-suspend
        ARM: multi_v7_defconfig: Enable Intel e1000e driver
        MAINTAINERS: add myself as Marvell berlin SoC maintainer
        bus: qcom-ebi2: depend on ARCH_QCOM or COMPILE_TEST
        ARM: dts: fix the SD card on the Snowball
        arm64: dts: rockchip: remove always-on and boot-on from vcc_sd
        arm64: dts: marvell: fix clocksource for CP110 master SPI0
        ARM: mvebu: Select corediv clk for all mvebu v7 SoC
      2674235f
    • David S. Miller's avatar
      Merge tag 'batadv-net-for-davem-20161026' of git://git.open-mesh.org/linux-merge · ad601339
      David S. Miller authored
      
      
      Simon Wunderlich says:
      
      ====================
      Here are three batman-adv bugfix patches:
      
       - Fix RCU usage for neighbor list, by Sven Eckelmann
      
       - Fix BATADV_DBG_ALL loglevel to include TP Meter messages, by Sven Eckelmann
      
       - Fix possible splat when disabling an interface, by Linus Luessing
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad601339