1. 17 Apr, 2016 2 commits
    • Linus Torvalds's avatar
      Merge tag 'driver-core-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · e1e22b27
      Linus Torvalds authored
      Pull misc fixes from Greg KH:
       "Here are three small fixes for 4.6-rc4.
      
        Two fix up some lz4 issues with big endian systems, and the remaining
        one resolves a minor debugfs issue that was reported.
      
        All have been in linux-next with no reported issues"
      
      * tag 'driver-core-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        lib: lz4: cleanup unaligned access efficiency detection
        lib: lz4: fixed zram with lz4 on big endian machines
        debugfs: Make automount point inodes permanently empty
      e1e22b27
    • Linus Torvalds's avatar
      Merge tag 'usb-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · b62dabfb
      Linus Torvalds authored
      Pull USB driver fixes from Greg KH:
       "Here are some small USB fixes for 4.6-rc4.
      
        Mostly xhci fixes for reported issues, a UAS bug that has hit a number
        of people, including stable tree users, and a few other minor things.
      
        All have been in linux-next for a while with no reported issues"
      
      * tag 'usb-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: hcd: out of bounds access in for_each_companion
        USB: uas: Add a new NO_REPORT_LUNS quirk
        USB: uas: Limit qdepth at the scsi-host level
        doc: usb: Fix typo in gadget_multi documentation
        usb: host: xhci-plat: Make enum xhci_plat_type start at a non zero value
        xhci: fix 10 second timeout on removal of PCI hotpluggable xhci controllers
        usb: xhci: fix wild pointers in xhci_mem_cleanup
        usb: host: xhci-plat: fix cannot work if R-Car Gen2/3 run on above 4GB phys
        usb: host: xhci: add a new quirk XHCI_NO_64BIT_SUPPORT
        xhci: resume USB 3 roothub first
        usb: xhci: applying XHCI_PME_STUCK_QUIRK to Intel BXT B0 host
        cdc-acm: fix crash if flushed with nothing buffered
      b62dabfb
  2. 16 Apr, 2016 7 commits
  3. 15 Apr, 2016 17 commits
  4. 14 Apr, 2016 13 commits
    • Mike Snitzer's avatar
      dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros · 9567366f
      Mike Snitzer authored
      The READ_LOCK macro was incorrectly returning -EINVAL if
      dm_bm_is_read_only() was true -- it will always be true once the cache
      metadata transitions to read-only by dm_cache_metadata_set_read_only().
      
      Wrap READ_LOCK and WRITE_LOCK multi-statement macros in do {} while(0).
      Also, all accesses of the 'cmd' argument passed to these related macros
      are now encapsulated in parenthesis.
      
      A follow-up patch can be developed to eliminate the use of macros in
      favor of pure C code.  Avoiding that now given that this needs to apply
      to stable@.
      Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Fixes: d14fcf3d ("dm cache: make sure every metadata function checks fail_io")
      Cc: stable@vger.kernel.org
      9567366f
    • Keith Busch's avatar
      NVMe: Always use MSI/MSI-x interrupts · a5229050
      Keith Busch authored
      Multiple users have reported device initialization failure due the driver
      not receiving legacy PCI interrupts. This is not unique to any particular
      controller, but has been observed on multiple platforms.
      
      There have been no issues reported or observed when with message signaled
      interrupts, so this patch attempts to use MSI-x during initialization,
      falling back to MSI. If that fails, legacy would become the default.
      
      The setup_io_queues error handling had to change as a result: the admin
      queue's msix_entry used to be initialized to the legacy IRQ. The case
      where nr_io_queues is 0 would fail request_irq when setting up the admin
      queue's interrupt since re-enabling MSI-x fails with 0 vectors, leaving
      the admin queue's msix_entry invalid. Instead, return success immediately.
      Reported-by: default avatarTim Muhlemmer <muhlemmer@gmail.com>
      Reported-by: default avatarJon Derrick <jonathan.derrick@intel.com>
      Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      a5229050
    • Linus Torvalds's avatar
      /proc/iomem: only expose physical resource addresses to privileged users · 51d7b120
      Linus Torvalds authored
      In commit c4004b02 ("x86: remove the kernel code/data/bss resources
      from /proc/iomem") I was hoping to remove the phyiscal kernel address
      data from /proc/iomem entirely, but that had to be reverted because some
      system programs actually use it.
      
      This limits all the detailed resource information to properly
      credentialed users instead.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      51d7b120
    • Linus Torvalds's avatar
      pci-sysfs: use proper file capability helper function · ab0fa82b
      Linus Torvalds authored
      The PCI config access checked the file capabilities correctly, but used
      the itnernal security capability check rather than the helper function
      that is actually meant for that.
      
      The security_capable() has unusual return values and is not meant to be
      used elsewhere (the only other use is in the capability checking
      functions that we actually intend people to use, and this odd PCI usage
      really stood out when looking around the capability code.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab0fa82b
    • Linus Torvalds's avatar
      Make file credentials available to the seqfile interfaces · 34dbbcdb
      Linus Torvalds authored
      A lot of seqfile users seem to be using things like %pK that uses the
      credentials of the current process, but that is actually completely
      wrong for filesystem interfaces.
      
      The unix semantics for permission checking files is to check permissions
      at _open_ time, not at read or write time, and that is not just a small
      detail: passing off stdin/stdout/stderr to a suid application and making
      the actual IO happen in privileged context is a classic exploit
      technique.
      
      So if we want to be able to look at permissions at read time, we need to
      use the file open credentials, not the current ones.  Normal file
      accesses can just use "f_cred" (or any of the helper functions that do
      that, like file_ns_capable()), but the seqfile interfaces do not have
      any such options.
      
      It turns out that seq_file _does_ save away the user_ns information of
      the file, though.  Since user_ns is just part of the full credential
      information, replace that special case with saving off the cred pointer
      instead, and suddenly seq_file has all the permission information it
      needs.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      34dbbcdb
    • Linus Torvalds's avatar
      Revert "x86: remove the kernel code/data/bss resources from /proc/iomem" · 4046d6e8
      Linus Torvalds authored
      This reverts commit c4004b02.
      
      Sadly, my hope that nobody would actually use the special kernel entries
      in /proc/iomem were dashed by kexec.  Which reads /proc/iomem explicitly
      to find the kernel base address.  Nasty.
      
      Anyway, that means we can't do the sane and simple thing and just remove
      the entries, and we'll instead have to mask them out based on permissions.
      Reported-by: default avatarZhengyu Zhang <zhezhang@redhat.com>
      Reported-by: default avatarDave Young <dyoung@redhat.com>
      Reported-by: default avatarFreeman Zhang <freeman.zhang1992@gmail.com>
      Reported-by: default avatarEmrah Demir <ed@abdsec.com>
      Reported-by: default avatarBaoquan He <bhe@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4046d6e8
    • Helge Deller's avatar
      parisc: Fix ftrace function tracer · 366dd4ea
      Helge Deller authored
      Fix the FTRACE function tracer for 32- and 64-bit kernel.
      The former code was horribly broken.
      
      Reimplement most coding in assembly and utilize optimizations, e.g. put
      mcount() and ftrace_stub() into one L1 cacheline.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      366dd4ea
    • Toshi Kani's avatar
      pmem: fix BUG() error in pmem.h:48 on X86_32 · cba2e47a
      Toshi Kani authored
      After 'commit fc0c2028 ("x86, pmem: use memcpy_mcsafe()
      for memcpy_from_pmem()")', probing a PMEM device hits the BUG()
      error below on X86_32 kernel.
      
       kernel BUG at include/linux/pmem.h:48!
      
      memcpy_from_pmem() calls arch_memcpy_from_pmem(), which is
      unimplemented since CONFIG_ARCH_HAS_PMEM_API is undefined on
      X86_32.
      
      Fix the BUG() error by adding default_memcpy_from_pmem().
      Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarToshi Kani <toshi.kani@hpe.com>
      Signed-off-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      cba2e47a
    • Stefan Agner's avatar
      pwm: fsl-ftm: Use flat regmap cache · ad06fdee
      Stefan Agner authored
      Use flat regmap cache to avoid lockdep warning at probe:
      
      [    0.697285] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2755 lockdep_trace_alloc+0x15c/0x160()
      [    0.697449] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))
      
      The RB-tree regmap cache needs to allocate new space on first writes.
      However, allocations in an atomic context (e.g. when a spinlock is held)
      are not allowed. The function regmap_write calls map->lock, which
      acquires a spinlock in the fast_io case. Since the pwm-fsl-ftm driver
      uses MMIO, the regmap bus of type regmap_mmio is being used which has
      fast_io set to true.
      
      The MMIO space of the pwm-fsl-ftm driver is reasonable condense, hence
      using the much faster flat regmap cache is anyway the better choice.
      Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
      Cc: Mark Brown <broonie@kernel.org>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      ad06fdee
    • Jon Hunter's avatar
      mmc: tegra: Disable UHS-I modes for Tegra124 · 70ad7f7e
      Jon Hunter authored
      Tegra124 has been randomly hanging during system suspend when entering
      the Tegra LP1 low power state. The hang is caused by the Tegra SDHCI
      driver and linked to the UHS-I tuning sequence. Disabling the UHS-I
      modes for Tegra124 prevents any hangs from occurring when entering
      system suspend.
      
      Unfortunately, the tuning sequence described in the public Tegra
      documentation is incomplete and on inspection of the current tuning
      sequence that has been implemented is also incomplete and may cause
      problems. In the short-term it is safer to disable UHS-I modes for now
      and fix later because it would be too large of a change to simply patch
      now. Therefore, disable UHS-I modes for Tegra124.
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Acked-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      70ad7f7e
    • Ulf Hansson's avatar
      mmc: block: Use the mmc host device index as the mmcblk device index · 9aaf3437
      Ulf Hansson authored
      Commit 520bd7a8 ("mmc: core: Optimize boot time by detecting cards
      simultaneously") causes regressions for some platforms.
      
      These platforms relies on fixed mmcblk device indexes, instead of
      deploying the defacto standard with UUID/PARTUUID. In other words their
      rootfs needs to be available at hardcoded paths, like /dev/mmcblk0p2.
      
      Such guarantees have never been made by the kernel, but clearly the above
      commit changes the behaviour. More precisely, because of that the order
      changes of how cards becomes detected, so do their corresponding mmcblk
      device indexes.
      
      As the above commit significantly improves boot time for some platforms
      (magnitude of seconds), let's avoid reverting this change but instead
      restore the behaviour of how mmcblk device indexes becomes picked.
      
      By using the same index for the mmcblk device as for the corresponding mmc
      host device, the probe order of mmc host devices decides the index we get
      for the mmcblk device.
      
      For those platforms that suffers from a regression, one could expect that
      this updated behaviour should be sufficient to meet their expectations of
      "fixed" mmcblk device indexes.
      
      Another side effect from this change, is that the same index is used for
      the mmc host device, the mmcblk device and the mmc block queue. That
      should clarify their relationship.
      Reported-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Reported-by: default avatarLaszlo Fiat <laszlo.fiat@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Fixes: 520bd7a8 ("mmc: core: Optimize boot time by detecting cards
      simultaneously")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      9aaf3437
    • Dave Airlie's avatar
      Merge branch 'exynos-drm-fixes' of... · ff3e84e8
      Dave Airlie authored
      Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      fix some exynos regressions.
      
      * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: Use VIDEO_SAMSUNG_S5P_G2D=n as G2D Kconfig dependency
        drm/exynos: fix a warning message
        drm/exynos: mic: fix an error code
        drm/exynos: fimd: fix broken dp_clock control
        drm/exynos: build fbdev code conditionally
        drm/exynos: fix adjusted_mode pointer in exynos_plane_mode_set
        drm/exynos: fix error handling in exynos_drm_subdrv_open
      ff3e84e8
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · 25451c19
      Dave Airlie authored
      some misc radeon fixes.
      
      * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux:
        drm/amd/amdgpu: fix irq domain remove for tonga ih
        drm/radeon: use helper for mst connector dpms.
        drm/radeon/mst: port some MST setup code from DAL.
        drm/amdgpu: add invisible pin size statistic
      25451c19
  5. 13 Apr, 2016 1 commit