1. 08 Dec, 2017 12 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.15-rc3' of git://people.freedesktop.org/~airlied/linux · 4066aa72
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This pull is a bit larger than I'd like but a large bunch of it is
        license fixes, AMD wanted to fix the licenses for a bunch of files
        that were missing them,
      
       Otherwise a bunch of TTM regression fix since the hugepage support,
       some i915 and gvt fixes, a core connector free in a safe context fix,
       and one bridge fix"
      
      * tag 'drm-fixes-for-v4.15-rc3' of git://people.freedesktop.org/~airlied/linux: (26 commits)
        drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback
        Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk"
        drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage
        drm/i915: Call i915_gem_init_userptr() before taking struct_mutex
        drm/exynos: remove unnecessary function declaration
        drm/exynos: remove unnecessary descrptions
        drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU
        drm/exynos: Fix dma-buf import
        drm/ttm: swap consecutive allocated pooled pages v4
        drm: safely free connectors from connector_iter
        drm/i915/gvt: set max priority for gvt context
        drm/i915/gvt: Don't mark vgpu context as inactive when preempted
        drm/i915/gvt: Limit read hw reg to active vgpu
        drm/i915/gvt: Export intel_gvt_render_mmio_to_ring_id()
        drm/i915/gvt: Emulate PCI expansion ROM base address register
        drm/ttm: swap consecutive allocated cached pages v3
        drm/ttm: roundup the shrink request to prevent skip huge pool
        drm/ttm: add page order support in ttm_pages_put
        drm/ttm: add set_pages_wb for handling page order more than zero
        drm/ttm: add page order in page pool
        ...
      4066aa72
    • Linus Torvalds's avatar
      Merge tag 'md/4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md · 7267212c
      Linus Torvalds authored
      Pull md fixes from Shaohua Li:
       "Some MD fixes.
      
        The notable one is a raid5-cache deadlock bug with dm-raid, others are
        not significant"
      
      * tag 'md/4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
        md/raid1/10: add missed blk plug
        md: limit mdstat resync progress to max_sectors
        md/r5cache: move mddev_lock() out of r5c_journal_mode_set()
        md/raid5: correct degraded calculation in raid5_error
      7267212c
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-4.15-part2' of... · 78d9b048
      Linus Torvalds authored
      Merge tag 'devicetree-fixes-for-4.15-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
      
      Pull DeviceTree fixes from Rob Herring:
       "Another set of DT fixes:
      
         - Fixes from overlay code rework. A trifecta of fixes to the locking,
           an out of bounds access, and a memory leak in of_overlay_apply()
      
         - Clean-up at25 eeprom binding document
      
         - Remove leading '0x' in unit-addresses from binding docs"
      
      * tag 'devicetree-fixes-for-4.15-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: overlay: Make node skipping in init_overlay_changeset() clearer
        of: overlay: Fix out-of-bounds write in init_overlay_changeset()
        of: overlay: Fix (un)locking in of_overlay_apply()
        of: overlay: Fix memory leak in of_overlay_apply() error path
        dt-bindings: eeprom: at25: Document device-specific compatible values
        dt-bindings: eeprom: at25: Grammar s/are can/can/
        dt-bindings: Remove leading 0x from bindings notation
        of: overlay: Remove else after goto
        of: Spelling s/changset/changeset/
        of: unittest: Remove bogus overlay mutex release from overlay_data_add()
      78d9b048
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 900add27
      Linus Torvalds authored
      Pull virtio bugfixes from Michael Tsirkin:
       "A couple of minor bugfixes"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio_net: fix return value check in receive_mergeable()
        virtio_mmio: add cleanup for virtio_mmio_remove
        virtio_mmio: add cleanup for virtio_mmio_probe
      900add27
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.15-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 32abeb09
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Just two small fixes for the new pvcalls frontend driver"
      
      * tag 'for-linus-4.15-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/pvcalls: Fix a check in pvcalls_front_remove()
        xen/pvcalls: check for xenbus_read() errors
      32abeb09
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · d90696ed
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       "One notable fix for kexec on Power9, where we were not clearing MMU
        PID properly which sometimes leads to hangs. Finally debugged to a
        root cause by Nick.
      
        A revert of a patch which tried to rework our panic handling to get
        more output on the console, but inadvertently broke reporting the
        panic to the hypervisor, which apparently people care about.
      
        Then a fix for an oops in the PMU code, and finally some s/%p/%px/ in
        xmon.
      
        Thanks to: David Gibson, Nicholas Piggin, Ravi Bangoria"
      
      * tag 'powerpc-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/xmon: Don't print hashed pointers in xmon
        powerpc/64s: Initialize ISAv3 MMU registers before setting partition table
        Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier"
        powerpc/perf: Fix oops when grouping different pmu events
      d90696ed
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · c6b3e969
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
      
       - three more patches in regard to the SPDX license tags. The missing
         tags for the files in arch/s390/kvm will be merged via the KVM tree.
         With that all s390 related files should have their SPDX tags.
      
       - a patch to get rid of 'struct timespec' in the DASD driver.
      
       - bug fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: fix compat system call table
        s390/mm: fix off-by-one bug in 5-level page table handling
        s390: Remove redudant license text
        s390: add a few more SPDX identifiers
        s390/dasd: prevent prefix I/O error
        s390: always save and restore all registers on context switch
        s390/dasd: remove 'struct timespec' usage
        s390/qdio: restrict target-full handling to IQDIO
        s390/qdio: consider ERROR buffers for inbound-full condition
        s390/virtio: add BSD license to virtio-ccw
      c6b3e969
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 6e7e7f4d
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "Fix some more FP register fallout from the SVE patches and also some
        problems with the PGD tracking in our software PAN emulation code,
        after we received a crash report from a 3.18 kernel running a
        backport.
      
        Summary:
      
         - fix SW PAN pgd shadowing for kernel threads, EFI and exiting user
           tasks
      
         - fix FP register leak when a task_struct is re-allocated
      
         - fix potential use-after-free in FP state tracking used by KVM"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64/sve: Avoid dereference of dead task_struct in KVM guest entry
        arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb
        arm64: SW PAN: Point saved ttbr0 at the zero page when switching to init_mm
        arm64: fpsimd: Abstract out binding of task's fpsimd context to the cpu.
        arm64: fpsimd: Prevent registers leaking from dead tasks
      6e7e7f4d
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 3625de4b
      Linus Torvalds authored
      Pull ACPI fix from Rafael Wysocki:
       "This fixes an out of bounds warning from KASAN in the ACPI CPPC
        driver"
      
      * tag 'acpi-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / CPPC: Fix KASAN global out of bounds warning
      3625de4b
    • Linus Torvalds's avatar
      Merge tag 'pm-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 7ed9fd2e
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "This fixes an issue in the device runtime PM framework that prevents
        customer devices from resuming if runtime PM is disabled for one or
        more of their supplier devices (as reflected by device links between
        those devices)"
      
      * tag 'pm-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / runtime: Fix handling of suppliers with disabled runtime PM
      7ed9fd2e
    • Geert Uytterhoeven's avatar
      of: overlay: Make node skipping in init_overlay_changeset() clearer · 589b754d
      Geert Uytterhoeven authored
      Make it more clear that nodes without "__overlay__" subnodes are
      skipped, by reverting the logic and using continue.
      This also reduces indentation level.
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      589b754d
    • Geert Uytterhoeven's avatar
      of: overlay: Fix out-of-bounds write in init_overlay_changeset() · 35e691ed
      Geert Uytterhoeven authored
      If an overlay has no "__symbols__" node, but it has nodes without
      "__overlay__" subnodes at the end (e.g. a "__fixups__" node), after
      filling in all fragments for nodes with "__overlay__" subnodes,
      "fragment = &fragments[cnt]" will point beyond the end of the allocated
      array.
      
      Hence writing to "fragment->overlay" will overwrite unallocated memory,
      which may lead to a crash later.
      
      Fix this by deferring both the assignment to "fragment" and the
      offending write afterwards until we know for sure the node has an
      "__overlay__" subnode, and thus a valid entry in "fragments[]".
      
      Fixes: 61b4de4e ("of: overlay: minor restructuring")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      35e691ed
  2. 07 Dec, 2017 24 commits
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 90eeb3aa
      Dave Airlie authored
      regression fix for vc4 + rpm stable fix for analogix bridge
      
      * tag 'drm-misc-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-misc:
        drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback
        drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage
      90eeb3aa
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2017-12-07' of... · 96980844
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Fix for fd.o bug #103997 CNL eDP + HDMI causing a machine hard hang (James)
      - Fix to allow suspending with a wedged GPU to hopefully unwedge it (Chris)
      - Fix for Gen2 vblank timestap/frame counter jumps (Ville)
      - Revert of a W/A for enabling FBC on CNL/GLK for certain images
        and sizes (Rodrigo)
      - Lockdep fix for i915 userptr code (Chris)
      
      gvt-fixes-2017-12-06
      
      - Fix invalid hw reg read value for vGPU (Xiong)
      - Fix qemu warning on PCI ROM bar missing (Changbin)
      - Workaround preemption regression (Zhenyu)
      
      * tag 'drm-intel-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-intel:
        Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk"
        drm/i915: Call i915_gem_init_userptr() before taking struct_mutex
        drm/i915/gvt: set max priority for gvt context
        drm/i915/gvt: Don't mark vgpu context as inactive when preempted
        drm/i915/gvt: Limit read hw reg to active vgpu
        drm/i915/gvt: Export intel_gvt_render_mmio_to_ring_id()
        drm/i915/gvt: Emulate PCI expansion ROM base address register
        drm/i915/cnl: Mask previous DDI - PLL mapping
        drm/i915: Fix vblank timestamp/frame counter jumps on gen2
        drm/i915: Skip switch-to-kernel-context on suspend when wedged
      96980844
    • Dave Airlie's avatar
      Merge tag 'exynos-drm-fixes-for-v4.15-rc3' of... · c2ef3a67
      Dave Airlie authored
      Merge tag 'exynos-drm-fixes-for-v4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      - fix page fault issue due to using wrong device object in prime import.
      - drop NONCONTIG flag without IOMMU support.
      - remove unnecessary members and declaration.
      
      * tag 'exynos-drm-fixes-for-v4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: remove unnecessary function declaration
        drm/exynos: remove unnecessary descrptions
        drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU
        drm/exynos: Fix dma-buf import
      c2ef3a67
    • Yunjian Wang's avatar
      virtio_net: fix return value check in receive_mergeable() · 03e9f8a0
      Yunjian Wang authored
      The function virtqueue_get_buf_ctx() could return NULL, the return
      value 'buf' need to be checked with NULL, not value 'ctx'.
      Signed-off-by: default avatarYunjian Wang <wangyunjian@huawei.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      03e9f8a0
    • weiping zhang's avatar
      virtio_mmio: add cleanup for virtio_mmio_remove · 25f32223
      weiping zhang authored
      cleanup all resource allocated by virtio_mmio_probe.
      Signed-off-by: default avatarweiping zhang <zhangweiping@didichuxing.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      25f32223
    • weiping zhang's avatar
      virtio_mmio: add cleanup for virtio_mmio_probe · 7eb781b1
      weiping zhang authored
      As mentioned at drivers/base/core.c:
      /*
       * NOTE: _Never_ directly free @dev after calling this function, even
       * if it returned an error! Always use put_device() to give up the
       * reference initialized in this function instead.
       */
      so we don't free vm_dev until vm_dev.dev.release be called.
      Signed-off-by: default avatarweiping zhang <zhangweiping@didichuxing.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      7eb781b1
    • Marek Szyprowski's avatar
      drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback · 510353a6
      Marek Szyprowski authored
      get_modes() callback might be called asynchronously from the DRM core and
      it is not synchronized with bridge_enable(), which sets proper runtime PM
      state of the main DP device. Fix this by calling pm_runtime_get_sync()
      before calling drm_get_edid(), which in turn calls drm_dp_i2c_xfer() and
      analogix_dp_transfer() to ensure that main DP device is runtime active
      when doing any access to its registers.
      
      This fixes the following kernel issue on Samsung Exynos5250 Snow board:
      Unhandled fault: imprecise external abort (0x406) at 0x00000000
      pgd = c0004000
      [00000000] *pgd=00000000
      Internal error: : 406 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0 PID: 62 Comm: kworker/0:2 Not tainted 4.13.0-rc2-00364-g4a97a3da #3357
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      Workqueue: events output_poll_execute
      task: edc14800 task.stack: edcb2000
      PC is at analogix_dp_transfer+0x15c/0x2fc
      LR is at analogix_dp_transfer+0x134/0x2fc
      pc : [<c0468538>]    lr : [<c0468510>]    psr: 60000013
      sp : edcb3be8  ip : 0000002a  fp : 00000001
      r10: 00000000  r9 : edcb3cd8  r8 : edcb3c40
      r7 : 00000000  r6 : edd3b380  r5 : edd3b010  r4 : 00000064
      r3 : 00000000  r2 : f0ad3000  r1 : edcb3c40  r0 : edd3b010
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      Control: 10c5387d  Table: 4000406a  DAC: 00000051
      Process kworker/0:2 (pid: 62, stack limit = 0xedcb2210)
      Stack: (0xedcb3be8 to 0xedcb4000)
      [<c0468538>] (analogix_dp_transfer) from [<c0424ba4>] (drm_dp_i2c_do_msg+0x8c/0x2b4)
      [<c0424ba4>] (drm_dp_i2c_do_msg) from [<c0424e64>] (drm_dp_i2c_xfer+0x98/0x214)
      [<c0424e64>] (drm_dp_i2c_xfer) from [<c057b2d8>] (__i2c_transfer+0x140/0x29c)
      [<c057b2d8>] (__i2c_transfer) from [<c057b4a4>] (i2c_transfer+0x70/0xe4)
      [<c057b4a4>] (i2c_transfer) from [<c0441de4>] (drm_do_probe_ddc_edid+0xb4/0x114)
      [<c0441de4>] (drm_do_probe_ddc_edid) from [<c0441e5c>] (drm_probe_ddc+0x18/0x28)
      [<c0441e5c>] (drm_probe_ddc) from [<c0445728>] (drm_get_edid+0x124/0x2d4)
      [<c0445728>] (drm_get_edid) from [<c0465ea0>] (analogix_dp_get_modes+0x90/0x114)
      [<c0465ea0>] (analogix_dp_get_modes) from [<c0425e8c>] (drm_helper_probe_single_connector_modes+0x198/0x68c)
      [<c0425e8c>] (drm_helper_probe_single_connector_modes) from [<c04325d4>] (drm_setup_crtcs+0x1b4/0xd18)
      [<c04325d4>] (drm_setup_crtcs) from [<c04344a8>] (drm_fb_helper_hotplug_event+0x94/0xd0)
      [<c04344a8>] (drm_fb_helper_hotplug_event) from [<c0425a50>] (drm_kms_helper_hotplug_event+0x24/0x28)
      [<c0425a50>] (drm_kms_helper_hotplug_event) from [<c04263ec>] (output_poll_execute+0x6c/0x174)
      [<c04263ec>] (output_poll_execute) from [<c0136f18>] (process_one_work+0x188/0x3fc)
      [<c0136f18>] (process_one_work) from [<c01371f4>] (worker_thread+0x30/0x4b8)
      [<c01371f4>] (worker_thread) from [<c013daf8>] (kthread+0x128/0x164)
      [<c013daf8>] (kthread) from [<c0108510>] (ret_from_fork+0x14/0x24)
      Code: 0a000002 ea000009 e2544001 0a00004a (e59537c8)
      ---[ end trace cddc7919c79f7878 ]---
      Reported-by: default avatarMisha Komarovskiy <zombah@gmail.com>
      CC: stable@vger.kernel.org # v4.10+
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171121074936.22520-1-m.szyprowski@samsung.com
      510353a6
    • Joonas Lahtinen's avatar
      Merge tag 'gvt-fixes-2017-12-06' of https://github.com/intel/gvt-linux into drm-intel-fixes · d85936ab
      Joonas Lahtinen authored
      gvt-fixes-2017-12-06
      
      - Fix invalid hw reg read value for vGPU (Xiong)
      - Fix qemu warning on PCI ROM bar missing (Changbin)
      - Workaround preemption regression (Zhenyu)
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171206075105.wlh2ojubjczlstox@zhen-hp.sh.intel.com
      d85936ab
    • Radhakrishna Sripada's avatar
      Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk" · 7a8b7053
      Radhakrishna Sripada authored
      This reverts commit 8f067837.
      
      HSD says "WA withdrawn. It was causing corruption with some images.
      WA is not strictly necessary since this bug just causes loss of FBC
      compression with some sizes and images, but doesn't break anything."
      
      Fixes: 8f067837 ("drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk")
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarRadhakrishna Sripada <radhakrishna.sripada@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171117010825.23118-1-radhakrishna.sripada@intel.com
      (cherry picked from commit 0cfecb7c)
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      7a8b7053
    • Boris Brezillon's avatar
      drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage · 5bfd4013
      Boris Brezillon authored
      With CONFIG_REFCOUNT_FULL enabled, refcount_inc() complains when it's
      passed a refcount object that has its counter set to 0. In this driver,
      this is a valid use case since we want to increment ->usecnt only when
      the BO object starts to be used by real HW components and this is
      definitely not the case when the BO is created.
      
      Fix the problem by using refcount_inc_not_zero() instead of
      refcount_inc() and fallback to refcount_set(1) when
      refcount_inc_not_zero() returns false. Note that this 2-steps operation
      is not racy here because the whole section is protected by a mutex
      which guarantees that the counter does not change between the
      refcount_inc_not_zero() and refcount_set() calls.
      
      Fixes: b9f19259 ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
      Reported-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
      Acked-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171122203928.28135-1-boris.brezillon@free-electrons.com
      5bfd4013
    • Chris Wilson's avatar
      drm/i915: Call i915_gem_init_userptr() before taking struct_mutex · ef78970a
      Chris Wilson authored
      We don't need struct_mutex to initialise userptr (it just allocates a
      workqueue for itself etc), but we do need struct_mutex later on in
      i915_gem_init() in order to feed requests onto the HW.
      
      This should break the chain
      
      [  385.697902] ======================================================
      [  385.697907] WARNING: possible circular locking dependency detected
      [  385.697913] 4.14.0-CI-Patchwork_7234+ #1 Tainted: G     U
      [  385.697917] ------------------------------------------------------
      [  385.697922] perf_pmu/2631 is trying to acquire lock:
      [  385.697927]  (&mm->mmap_sem){++++}, at: [<ffffffff811bfe1e>] __might_fault+0x3e/0x90
      [  385.697941]
                     but task is already holding lock:
      [  385.697946]  (&cpuctx_mutex){+.+.}, at: [<ffffffff8116fe8c>] perf_event_ctx_lock_nested+0xbc/0x1d0
      [  385.697957]
                     which lock already depends on the new lock.
      
      [  385.697963]
                     the existing dependency chain (in reverse order) is:
      [  385.697970]
                     -> #4 (&cpuctx_mutex){+.+.}:
      [  385.697980]        __mutex_lock+0x86/0x9b0
      [  385.697985]        perf_event_init_cpu+0x5a/0x90
      [  385.697991]        perf_event_init+0x178/0x1a4
      [  385.697997]        start_kernel+0x27f/0x3f1
      [  385.698003]        verify_cpu+0x0/0xfb
      [  385.698006]
                     -> #3 (pmus_lock){+.+.}:
      [  385.698015]        __mutex_lock+0x86/0x9b0
      [  385.698020]        perf_event_init_cpu+0x21/0x90
      [  385.698025]        cpuhp_invoke_callback+0xca/0xc00
      [  385.698030]        _cpu_up+0xa7/0x170
      [  385.698035]        do_cpu_up+0x57/0x70
      [  385.698039]        smp_init+0x62/0xa6
      [  385.698044]        kernel_init_freeable+0x97/0x193
      [  385.698050]        kernel_init+0xa/0x100
      [  385.698055]        ret_from_fork+0x27/0x40
      [  385.698058]
                     -> #2 (cpu_hotplug_lock.rw_sem){++++}:
      [  385.698068]        cpus_read_lock+0x39/0xa0
      [  385.698073]        apply_workqueue_attrs+0x12/0x50
      [  385.698078]        __alloc_workqueue_key+0x1d8/0x4d8
      [  385.698134]        i915_gem_init_userptr+0x5f/0x80 [i915]
      [  385.698176]        i915_gem_init+0x7c/0x390 [i915]
      [  385.698213]        i915_driver_load+0x99e/0x15c0 [i915]
      [  385.698250]        i915_pci_probe+0x33/0x90 [i915]
      [  385.698256]        pci_device_probe+0xa1/0x130
      [  385.698262]        driver_probe_device+0x293/0x440
      [  385.698267]        __driver_attach+0xde/0xe0
      [  385.698272]        bus_for_each_dev+0x5c/0x90
      [  385.698277]        bus_add_driver+0x16d/0x260
      [  385.698282]        driver_register+0x57/0xc0
      [  385.698287]        do_one_initcall+0x3e/0x160
      [  385.698292]        do_init_module+0x5b/0x1fa
      [  385.698297]        load_module+0x2374/0x2dc0
      [  385.698302]        SyS_finit_module+0xaa/0xe0
      [  385.698307]        entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  385.698311]
                     -> #1 (&dev->struct_mutex){+.+.}:
      [  385.698320]        __mutex_lock+0x86/0x9b0
      [  385.698361]        i915_mutex_lock_interruptible+0x4c/0x130 [i915]
      [  385.698403]        i915_gem_fault+0x206/0x760 [i915]
      [  385.698409]        __do_fault+0x1a/0x70
      [  385.698413]        __handle_mm_fault+0x7c4/0xdb0
      [  385.698417]        handle_mm_fault+0x154/0x300
      [  385.698440]        __do_page_fault+0x2d6/0x570
      [  385.698445]        page_fault+0x22/0x30
      [  385.698449]
                     -> #0 (&mm->mmap_sem){++++}:
      [  385.698459]        lock_acquire+0xaf/0x200
      [  385.698464]        __might_fault+0x68/0x90
      [  385.698470]        _copy_to_user+0x1e/0x70
      [  385.698475]        perf_read+0x1aa/0x290
      [  385.698480]        __vfs_read+0x23/0x120
      [  385.698484]        vfs_read+0xa3/0x150
      [  385.698488]        SyS_read+0x45/0xb0
      [  385.698493]        entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  385.698497]
                     other info that might help us debug this:
      
      [  385.698505] Chain exists of:
                       &mm->mmap_sem --> pmus_lock --> &cpuctx_mutex
      
      [  385.698517]  Possible unsafe locking scenario:
      
      [  385.698522]        CPU0                    CPU1
      [  385.698526]        ----                    ----
      [  385.698529]   lock(&cpuctx_mutex);
      [  385.698553]                                lock(pmus_lock);
      [  385.698558]                                lock(&cpuctx_mutex);
      [  385.698564]   lock(&mm->mmap_sem);
      [  385.698568]
                      *** DEADLOCK ***
      
      [  385.698574] 1 lock held by perf_pmu/2631:
      [  385.698578]  #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff8116fe8c>] perf_event_ctx_lock_nested+0xbc/0x1d0
      [  385.698589]
                     stack backtrace:
      [  385.698595] CPU: 3 PID: 2631 Comm: perf_pmu Tainted: G     U          4.14.0-CI-Patchwork_7234+ #1
      [  385.698602] Hardware name:                  /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017
      [  385.698609] Call Trace:
      [  385.698615]  dump_stack+0x5f/0x86
      [  385.698621]  print_circular_bug.isra.18+0x1d0/0x2c0
      [  385.698627]  __lock_acquire+0x19c3/0x1b60
      [  385.698634]  ? generic_exec_single+0x77/0xe0
      [  385.698640]  ? lock_acquire+0xaf/0x200
      [  385.698644]  lock_acquire+0xaf/0x200
      [  385.698650]  ? __might_fault+0x3e/0x90
      [  385.698655]  __might_fault+0x68/0x90
      [  385.698660]  ? __might_fault+0x3e/0x90
      [  385.698665]  _copy_to_user+0x1e/0x70
      [  385.698670]  perf_read+0x1aa/0x290
      [  385.698675]  __vfs_read+0x23/0x120
      [  385.698682]  ? __fget+0x101/0x1f0
      [  385.698686]  vfs_read+0xa3/0x150
      [  385.698691]  SyS_read+0x45/0xb0
      [  385.698696]  entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  385.698701] RIP: 0033:0x7ff1c46876ed
      [  385.698705] RSP: 002b:00007fff13552f90 EFLAGS: 00000293 ORIG_RAX: 0000000000000000
      [  385.698712] RAX: ffffffffffffffda RBX: ffffc90000647ff0 RCX: 00007ff1c46876ed
      [  385.698718] RDX: 0000000000000010 RSI: 00007fff13552fa0 RDI: 0000000000000005
      [  385.698723] RBP: 000056063d300580 R08: 0000000000000000 R09: 0000000000000060
      [  385.698729] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000046
      [  385.698734] R13: 00007fff13552c6f R14: 00007ff1c6279d00 R15: 00007ff1c6279a40
      
      Testcase: igt/perf_pmu
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171122172621.16158-1-chris@chris-wilson.co.ukReviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      (cherry picked from commit ee48700d)
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      ef78970a
    • Heiko Carstens's avatar
      s390: fix compat system call table · e779498d
      Heiko Carstens authored
      When wiring up the socket system calls the compat entries were
      incorrectly set. Not all of them point to the corresponding compat
      wrapper functions, which clear the upper 33 bits of user space
      pointers, like it is required.
      
      Fixes: 977108f8 ("s390: wire up separate socketcalls system calls")
      Cc: <stable@vger.kernel.org> # v4.3+
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      e779498d
    • Linus Torvalds's avatar
      Merge tag 'for_linus-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb · 968edbd9
      Linus Torvalds authored
      Pull kgdb fixes from Jason Wessel:
      
       - Fix long standing problem with kdb kallsyms_symbol_next() return
         value
      
       - Add new co-maintainer Daniel Thompson
      
      * tag 'for_linus-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb:
        kgdb/kdb/debug_core: Add co-maintainer Daniel Thompson
        kdb: Fix handling of kallsyms_symbol_next() return value
      968edbd9
    • Linus Torvalds's avatar
      proc: show si_ptr in /proc/<pid>/timers without hashing · ba3edf1f
      Linus Torvalds authored
      It's a user pointer, and while the permissions of the file are pretty
      questionable (should it really be readable to everybody), hashing the
      pointer isn't going to be the solution.
      
      We should take a closer look at more of the /proc/<pid> file permissions
      in general.  Sure, we do want many of them to often be readable (for
      'ps' and friends), but I think we should probably do a few conversions
      from S_IRUGO to S_IRUSR.
      Reported-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ba3edf1f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 10f837e5
      Linus Torvalds authored
      Pull m68knommu fixes from Greg Ungerer:
       "There are two fixes here. One to add a missing linker section to the
        m68k architecture linker scripts, the other to fix a defconfig build
        problem"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k/defconfig: fix stmark2 broken local compilation
        m68k: add missing SOFTIRQENTRY_TEXT linker section
      10f837e5
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dd53a421
      Linus Torvalds authored
      Pull misc x86 fixes from Ingo Molnar:
      
       - make CR4 handling irq-safe, which bug vmware guests ran into
      
       - don't crash on early IRQs in Xen guests
      
       - don't crash secondary CPU bringup if #UD assisted WARN()ings are
         triggered
      
       - make X86_BUG_FXSAVE_LEAK optional on newer AMD CPUs that have the fix
      
       - fix AMD Fam17h microcode loading
      
       - fix broadcom_postcore_init() if ACPI is disabled
      
       - fix resume regression in __restore_processor_context()
      
       - fix Sparse warnings
      
       - fix a GCC-8 warning
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vdso: Change time() prototype to match __vdso_time()
        x86: Fix Sparse warnings about non-static functions
        x86/power: Fix some ordering bugs in __restore_processor_context()
        x86/PCI: Make broadcom_postcore_init() check acpi_disabled
        x86/microcode/AMD: Add support for fam17h microcode loading
        x86/cpufeatures: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD
        x86/idt: Load idt early in start_secondary
        x86/xen: Support early interrupts in xen pv guests
        x86/tlb: Disable interrupts when changing CR4
        x86/tlb: Refactor CR4 setting and shadow write
      dd53a421
    • Linus Torvalds's avatar
      Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4b43a3bc
      Linus Torvalds authored
      Pull CPU hotplug fix from Ingo Molnar:
       "A single fix moving the smp-call queue flush step to the intended
        point in the state machine"
      
      * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        smp/hotplug: Move step CPUHP_AP_SMPCFD_DYING to the correct place
      4b43a3bc
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e017b4db
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "This includes a fix for the add_wait_queue() queue ordering brown
        paperbag bug, plus PELT accounting fixes for cgroups scheduling
        artifacts"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Update and fix the runnable propagation rule
        sched/wait: Fix add_wait_queue() behavioral change
      e017b4db
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1c764725
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "This includes perf namespace support kernel side fixes, plus an
        accumulated set of perf tooling fixes - including UAPI header
        synchronization that should make the perf build less noisy"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
        tooling/headers: Synchronize updated s390 and x86 UAPI headers
        tools headers: Syncronize mman.h ABI header
        tools headers: Synchronize prctl.h ABI header
        tools headers: Synchronize KVM arch ABI headers
        tools headers: Synchronize drm/i915_drm.h
        tools headers uapi: Synchronize drm/drm.h
        tools headers: Synchronize perf_event.h header
        tools headers: Synchronize kernel ABI headers wrt SPDX tags
        tools/headers: Synchronize kernel x86 UAPI headers
        perf intel-pt: Bring instruction decoder files into line with the kernel
        perf test: Fix test 21 for s390x
        perf bench numa: Fixup discontiguous/sparse numa nodes
        perf top: Use signal interface for SIGWINCH handler
        perf top: Fix window dimensions change handling
        perf: Fix header.size for namespace events
        perf top: Ignore kptr_restrict when not sampling the kernel
        perf record: Ignore kptr_restrict when not sampling the kernel
        perf report: Ignore kptr_restrict when not sampling the kernel
        perf evlist: Add helper to check if attr.exclude_kernel is set in all evsels
        perf test shell: Fix test case probe libc's inet_pton on s390x
        ...
      1c764725
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 189dbab0
      Linus Torvalds authored
      Pull lockdep fix from Ingo Molnar:
       "Fix a possible NULL dereference for the (rare) case when a task
        doesn't have ->xhlocks space allocated due to kmalloc() OOM-ing"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/lockdep: Fix possible NULL deref
      189dbab0
    • Inki Dae's avatar
      drm/exynos: remove unnecessary function declaration · 1cd6ae35
      Inki Dae authored
      Removed exynos_drm_get_dma_device funtion declaration on top
      of exynos_drm_drv.c file.
      
      We can remove this declaration by moving the implementation
      of this function upwards.
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      1cd6ae35
    • Inki Dae's avatar
      drm/exynos: remove unnecessary descrptions · 2f0f6dfc
      Inki Dae authored
      Removed two descriptions to 'da_start' and 'da_space_size'
      from exynos_drm_private structure.
      
      These members don't exist anymore.
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      2f0f6dfc
    • Marek Szyprowski's avatar
      drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU · 120a264f
      Marek Szyprowski authored
      When no IOMMU is available, all GEM buffers allocated by Exynos DRM driver
      are contiguous, because of the underlying dma_alloc_attrs() function
      provides only such buffers. In such case it makes no sense to keep
      BO_NONCONTIG flag for the allocated GEM buffers. This allows to avoid
      failures for buffer contiguity checks in the subsequent operations on GEM
      objects.
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      CC: stable@vger.kernel.org # v4.4+
      120a264f
    • Marek Szyprowski's avatar
      drm/exynos: Fix dma-buf import · 89452d4a
      Marek Szyprowski authored
      When IOMMU support was enabled, dma-buf import in Exynos DRM was broken
      since commit f43c3596 ("drm/exynos: use real device for DMA-mapping
      operations") due to using wrong struct device in drm_gem_prime_import()
      function. This patch fixes following kernel BUG caused by incorrect buffer
      mapping to DMA address space:
      
      exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0xb2e00000
      ------------[ cut here ]------------
      kernel BUG at drivers/iommu/exynos-iommu.c:449!
      Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0-rc4-next-20171016-00033-g990d723669fd #3165
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      task: c0e0b7c0 task.stack: c0e00000
      PC is at exynos_sysmmu_irq+0x1d0/0x24c
      LR is at exynos_sysmmu_irq+0x154/0x24c
      ------------[ cut here ]------------
      Reported-by: default avatarMarian Mihailescu <mihailescu2m@gmail.com>
      Fixes: f43c3596 ("drm/exynos: use real device for DMA-mapping operations")
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: default avatarTobias Jakobi <tjakobi@math.uni-bielefeld.de>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      89452d4a
  3. 06 Dec, 2017 4 commits