1. 15 2月, 2016 1 次提交
  2. 14 1月, 2016 2 次提交
    • C
      iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG · fda3bec1
      CQ Tang 提交于
      This is a 32-bit register. Apparently harmless on real hardware, but
      causing justified warnings in simulation.
      Signed-off-by: NCQ Tang <cq.tang@intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Cc: stable@vger.kernel.org
      fda3bec1
    • D
      iommu/vt-d: Fix mm refcounting to hold mm_count not mm_users · e57e58bd
      David Woodhouse 提交于
      Holding mm_users works OK for graphics, which was the first user of SVM
      with VT-d. However, it works less well for other devices, where we actually
      do a mmap() from the file descriptor to which the SVM PASID state is tied.
      
      In this case on process exit we end up with a recursive reference count:
       - The MM remains alive until the file is closed and the driver's release()
         call ends up unbinding the PASID.
       - The VMA corresponding to the mmap() remains intact until the MM is
         destroyed.
       - Thus the file isn't closed, even when exit_files() runs, because the
         VMA is still holding a reference to it. And the MM remains alive…
      
      To address this issue, we *stop* holding mm_users while the PASID is bound.
      We already hold mm_count by virtue of the MMU notifier, and that can be
      made to be sufficient.
      
      It means that for a period during process exit, the fun part of mmput()
      has happened and exit_mmap() has been called so the MM is basically
      defunct. But the PGD still exists and the PASID is still bound to it.
      
      During this period, we have to be very careful — exit_mmap() doesn't use
      mm->mmap_sem because it doesn't expect anyone else to be touching the MM
      (quite reasonably, since mm_users is zero). So we also need to fix the
      fault handler to just report failure if mm_users is already zero, and to
      temporarily bump mm_users while handling any faults.
      
      Additionally, exit_mmap() calls mmu_notifier_release() *before* it tears
      down the page tables, which is too early for us to flush the IOTLB for
      this PASID. And __mmu_notifier_release() removes every notifier from the
      list, so when exit_mmap() finally *does* tear down the mappings and
      clear the page tables, we don't get notified. So we work around this by
      clearing the PASID table entry in our MMU notifier release() callback.
      That way, the hardware *can't* get any pages back from the page tables
      before they get cleared.
      
      Hardware designers have confirmed that the resulting 'PASID not present'
      faults should be handled just as gracefully as 'page not present' faults,
      the important criterion being that they don't perturb the operation for
      any *other* PASID in the system.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Cc: stable@vger.kernel.org
      e57e58bd
  3. 11 1月, 2016 1 次提交
  4. 10 1月, 2016 2 次提交
  5. 09 1月, 2016 14 次提交
  6. 08 1月, 2016 7 次提交
  7. 07 1月, 2016 13 次提交
    • R
      dts: vt8500: Add SDHC node to DTS file for WM8650 · 0f090bf1
      Roman Volkov 提交于
      Since WM8650 has the same 'WMT' SDHC controller as WM8505, and the driver
      is already in the kernel, this node enables the controller support for
      WM8650
      Signed-off-by: NRoman Volkov <rvolkov@v1ros.org>
      Reviewed-by: NAlexey Charkov <alchark@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      0f090bf1
    • T
      ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices · 5b1a6181
      Timo Sigurdsson 提交于
      Commit 69fb4dca ("power: Add an axp20x-usb-power driver") introduced a
      new driver for the USB power supply used on various Allwinner based SBCs.
      However, the driver was not added to multi_v7_defconfig which breaks USB
      support for some boards (e.g. LeMaker BananaPi) as the kernel will now
      turn off the USB power supply during boot by default if the driver isn't
      present. (This was not the case in linux 4.3 or lower where the USB power
      was always left on.)
      
      Hence, add the driver to multi_v7_defconfig in order to keep USB support
      working on those boards that require it.
      Signed-off-by: NTimo Sigurdsson <public_timo.s@silentcreek.de>
      Tested-by: NTimo Sigurdsson <public_timo.s@silentcreek.de>
      Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      5b1a6181
    • P
      kvm: x86: only channel 0 of the i8254 is linked to the HPET · e5e57e7a
      Paolo Bonzini 提交于
      While setting the KVM PIT counters in 'kvm_pit_load_count', if
      'hpet_legacy_start' is set, the function disables the timer on
      channel[0], instead of the respective index 'channel'. This is
      because channels 1-3 are not linked to the HPET.  Fix the caller
      to only activate the special HPET processing for channel 0.
      Reported-by: NP J P <pjp@fedoraproject.org>
      Fixes: 0185604cSigned-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e5e57e7a
    • R
      iommu/dma: Use correct offset in map_sg · 164afb1d
      Robin Murphy 提交于
      When mapping a non-page-aligned scatterlist entry, we copy the original
      offset to the output DMA address before aligning it to hand off to
      iommu_map_sg(), then later adding the IOVA page address portion to get
      the final mapped address. However, when the IOVA page size is smaller
      than the CPU page size, it is the offset within the IOVA page we want,
      not that within the CPU page, which can easily be larger than an IOVA
      page and thus result in an incorrect final address.
      
      Fix the bug by taking only the IOVA-aligned part of the offset as the
      basis of the DMA address, not the whole thing.
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      164afb1d
    • D
      Merge branch 'linux-4.4' of git://github.com/skeggsb/linux into drm-fixes · 3bea6a4c
      Dave Airlie 提交于
      single nv40 oops fix.
      
      * 'linux-4.4' of git://github.com/skeggsb/linux:
        drm/nouveau/gr/nv40: fix oops in interrupt handler
      3bea6a4c
    • R
      dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag · b0b79024
      Rameshwar Prasad Sahu 提交于
      For interrupt controller that doesn't support irq_disable and hardware
      with level interrupt, an extra interrupt can be pending. This patch fixes
      the issue by setting IRQ_DISABLE_UNLAZY flag for the interrupt line.
      
      Reference: http://git.kernel.org/tip/e9849777d0e27cdd2902805be51da73e7c79578cSigned-off-by: NRameshwar Prasad Sahu <rsahu@apm.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      b0b79024
    • N
      async_tx: use GFP_NOWAIT rather than GFP_IO · b02bab6b
      NeilBrown 提交于
      These async_XX functions are called from md/raid5 in an atomic
      section, between get_cpu() and put_cpu(), so they must not sleep.
      So use GFP_NOWAIT rather than GFP_IO.
      
      Dan Williams writes: Longer term async_tx needs to be merged into md
      directly as we can allocate this unmap data statically per-stripe
      rather than per request.
      
      Fixed: 7476bd79 ("async_pq: convert to dmaengine_unmap_data")
      Cc: stable@vger.kernel.org (v3.13+)
      Reported-and-tested-by: NStanislav Samsonov <slava@annapurnalabs.com>
      Acked-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      b02bab6b
    • L
      ARM: versatile: fix MMC/SD interrupt assignment · 20f12758
      Linus Walleij 提交于
      Commit 0976c946
      "arm/versatile: Fix versatile irq specifications"
      has an off-by-one error on the Versatile AB that has
      been regressing the Versatile AB hardware for some time.
      
      However it seems like the interrupt assignments have
      never been correct and I have now adjusted them according
      to the specification. The masks for the valid interrupts
      made it impossible to assign the right SIC interrupt
      for the MMCI, so I went in and fixed these to correspond
      to the specifications, and added references if anyone
      wants to double-check.
      
      Due to the Versatile PB including the Versatile AB
      as a base DTS file, we need to override and correct
      some values to correspond to the actual changes in the
      hardware.
      
      For the Versatile PB I don't think the IRQ line
      assignment for MMCI has ever been correct for either of
      the two MMCI blocks. It would be nice if someone with the
      physical PB board could test this.
      
      Patch tested on the Versatile AB, QEMU for Versatile AB
      and QEMU for Versatile PB.
      
      Cc: Rob Herring <robh@kernel.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: stable@vger.kernel.org
      Fixes: 0976c946 ("arm/versatile: Fix versatile irq specifications")
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      20f12758
    • L
      ARM: nomadik: set latencies to 8 cycles · a461a3ec
      Linus Walleij 提交于
      The Nomadik has sporadic crashes because of these latencies, setting
      them to max makes the platform work nicely, so use this values for
      now.
      
      These latencies were set to 2 since the Nomadik platform was merged,
      but I suspect they never took effect until the right size and
      associativity for the cache was specified in the device tree and
      that is why the crash comes now.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      a461a3ec
    • L
      Merge tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd · b06f3a16
      Linus Torvalds 提交于
      Pull MTD fixes from Brian Norris:
       "Three last MTD fixes for v4.4.  These are all fixes for regressions
        and bugs reported mid cycle.  Unfortunately, some of them took a bit
        long to get proper testing and feedback.
      
         - Assign the default MTD name earlier in the registration process, so
           partition parsers (like cmdlinepart) see the right name.  Without
           this, some systems may come up with unpartitioned flash.  This was
           a v4.4-rc1 regression.
      
         - Revert some new Winbond SPI NOR flash unlocking/locking support;
           new code in v4.4 caused regressions on some Spansion flash.
      
         - Fix mis-typed parameter ordering in SPI NOR unlock function; this
           bug was introduced in v4.4-rc1"
      
      * tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd:
        mtd: spi-nor: fix stm_is_locked_sr() parameters
        mtd: spi-nor: fix Spansion regressions (aliased with Winbond)
        mtd: fix cmdlinepart parser, early naming for auto-filled MTD
      b06f3a16
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 51cb67c0
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "As usual, there are a couple straggler bug fixes:
      
         1) qlcnic_alloc_mbx_args() error returns are not checked in qlcnic
            driver.  Fix from Insu Yun.
      
         2) SKB refcounting bug in connector, from Florian Westphal.
      
         3) vrf_get_saddr() has to propagate fib_lookup() errors to it's
            callers, from David Ahern.
      
         4) Fix AF_UNIX splice/bind deadlock, from Rainer Weikusat.
      
         5) qdisc_rcu_free() fails to free the per-cpu qstats.  Fix from John
            Fastabend.
      
         6) vmxnet3 driver passes wrong page to dma_map_page(), fix from
           Shrikrishna Khare.
      
         7) Don't allow zero cwnd in tcp_cwnd_reduction(), from Yuchung Cheng"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        tcp: fix zero cwnd in tcp_cwnd_reduction
        Driver: Vmxnet3: Fix regression caused by 5738a09d
        net: qmi_wwan: Add WeTelecom-WPD600N
        mkiss: fix scribble on freed memory
        net: possible use after free in dst_release
        net: sched: fix missing free per cpu on qstats
        ARM: net: bpf: fix zero right shift
        6pack: fix free memory scribbles
        net: filter: make JITs zero A for SKF_AD_ALU_XOR_X
        bridge: Only call /sbin/bridge-stp for the initial network namespace
        af_unix: Fix splice-bind deadlock
        net: Propagate lookup failure in l3mdev_get_saddr to caller
        r8152: add reset_resume function
        connector: bump skb->users before callback invocation
        cxgb4: correctly handling failed allocation
        qlcnic: correctly handle qlcnic_alloc_mbx_args
      51cb67c0
    • Y
      tcp: fix zero cwnd in tcp_cwnd_reduction · 8b8a321f
      Yuchung Cheng 提交于
      Patch 3759824d ("tcp: PRR uses CRB mode by default and SS mode
      conditionally") introduced a bug that cwnd may become 0 when both
      inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
      to a div-by-zero if the connection starts another cwnd reduction
      phase by setting tp->prior_cwnd to the current cwnd (0) in
      tcp_init_cwnd_reduction().
      
      To prevent this we skip PRR operation when nothing is acked or
      sacked. Then cwnd must be positive in all cases as long as ssthresh
      is positive:
      
      1) The proportional reduction mode
         inflight > ssthresh > 0
      
      2) The reduction bound mode
        a) inflight == ssthresh > 0
      
        b) inflight < ssthresh
           sndcnt > 0 since newly_acked_sacked > 0 and inflight < ssthresh
      
      Therefore in all cases inflight and sndcnt can not both be 0.
      We check invalid tp->prior_cwnd to avoid potential div0 bugs.
      
      In reality this bug is triggered only with a sequence of less common
      events.  For example, the connection is terminating an ECN-triggered
      cwnd reduction with an inflight 0, then it receives reordered/old
      ACKs or DSACKs from prior transmission (which acks nothing). Or the
      connection is in fast recovery stage that marks everything lost,
      but fails to retransmit due to local issues, then receives data
      packets from other end which acks nothing.
      
      Fixes: 3759824d ("tcp: PRR uses CRB mode by default and SS mode conditionally")
      Reported-by: NOleksandr Natalenko <oleksandr@natalenko.name>
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b8a321f
    • S