1. 12 5月, 2018 11 次提交
    • L
      Merge tag 'ceph-for-4.17-rc5' of git://github.com/ceph/ceph-client · ac428036
      Linus Torvalds 提交于
      Pull ceph fixes from Ilya Dryomov:
       "These patches fix two long-standing bugs in the DIO code path, one of
        which is a crash trivially triggerable with splice()"
      
      * tag 'ceph-for-4.17-rc5' of git://github.com/ceph/ceph-client:
        ceph: fix iov_iter issues in ceph_direct_read_write()
        libceph: add osd_req_op_extent_osd_data_bvecs()
        ceph: fix rsize/wsize capping in ceph_direct_read_write()
      ac428036
    • L
      Merge tag 'sh-for-4.17-fixes' of git://git.libc.org/linux-sh · 3f5f8596
      Linus Torvalds 提交于
      Pull arch/sh fixes from Rich Felker:
       "Fixes for critical regressions and a build failure.
      
        The regressions were introduced in 4.15 and 4.17-rc1 and prevented
        booting on affected systems"
      
      * tag 'sh-for-4.17-fixes' of git://git.libc.org/linux-sh:
        sh: switch to NO_BOOTMEM
        sh: mm: Fix unprotected access to struct device
        sh: fix build failure for J2 cpu with SMP disabled
      3f5f8596
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 7404bc27
      Linus Torvalds 提交于
      Pull arm64 fixes from Will Deacon:
       "There's a small memblock accounting problem when freeing the initrd
        and a Spectre-v2 mitigation for NVIDIA Denver CPUs which just requires
        a match on the CPU ID register.
      
        Summary:
      
         - Mitigate Spectre-v2 for NVIDIA Denver CPUs
      
         - Free memblocks corresponding to freed initrd area"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: capabilities: Add NVIDIA Denver CPU to bp_harden list
        arm64: Add MIDR encoding for NVIDIA CPUs
        arm64: To remove initrd reserved area entry from memblock
      7404bc27
    • L
      Merge tag 'powerpc-4.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 5c6b5460
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
       "One fix for an actual regression, the change to the SYSCALL_DEFINE
        wrapper broke FTRACE_SYSCALLS for us due to a name mismatch. There's
        also another commit to the same code to make sure we match all our
        syscalls with various prefixes.
      
        And then just one minor build fix, and the removal of an unused
        variable that was removed and then snuck back in due to some rebasing.
      
        Thanks to: Naveen N. Rao"
      
      * tag 'powerpc-4.17-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/pseries: Fix CONFIG_NUMA=n build
        powerpc/trace/syscalls: Update syscall name matching logic to account for ppc_ prefix
        powerpc/trace/syscalls: Update syscall name matching logic
        powerpc/64: Remove unused paca->soft_enabled
      5c6b5460
    • L
      Merge tag 'trace-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · c110a8b7
      Linus Torvalds 提交于
      Pull tracing fix from Steven Rostedt:
       "Working on some new updates to trace filtering, I noticed that the
        regex_match_front() test was updated to be limited to the size of the
        pattern instead of the full test string.
      
        But as the test string is not guaranteed to be nul terminated, it
        still needs to consider the size of the test string"
      
      * tag 'trace-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix regex_match_front() to not over compare the test string
      c110a8b7
    • L
      Merge tag 'for-linus-4.17-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 84c3a097
      Linus Torvalds 提交于
      Pull xen fix from Juergen Gross:
       "One fix for the kernel running as a fully virtualized guest using PV
        drivers on old Xen hypervisor versions"
      
      * tag 'for-linus-4.17-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        x86/xen: Reset VCPU0 info pointer after shared_info remap
      84c3a097
    • R
      sh: switch to NO_BOOTMEM · ac21fc2d
      Rob Herring 提交于
      Commit 0fa1c579 ("of/fdt: use memblock_virt_alloc for early alloc")
      inadvertently switched the DT unflattening allocations from memblock to
      bootmem which doesn't work because the unflattening happens before
      bootmem is initialized. Swapping the order of bootmem init and
      unflattening could also fix this, but removing bootmem is desired. So
      enable NO_BOOTMEM on SH like other architectures have done.
      
      Fixes: 0fa1c579 ("of/fdt: use memblock_virt_alloc for early alloc")
      Reported-by: NRich Felker <dalias@libc.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NRich Felker <dalias@libc.org>
      ac21fc2d
    • L
      mmap: introduce sane default mmap limits · be83bbf8
      Linus Torvalds 提交于
      The internal VM "mmap()" interfaces are based on the mmap target doing
      everything using page indexes rather than byte offsets, because
      traditionally (ie 32-bit) we had the situation that the byte offset
      didn't fit in a register.  So while the mmap virtual address was limited
      by the word size of the architecture, the backing store was not.
      
      So we're basically passing "pgoff" around as a page index, in order to
      be able to describe backing store locations that are much bigger than
      the word size (think files larger than 4GB etc).
      
      But while this all makes a ton of sense conceptually, we've been dogged
      by various drivers that don't really understand this, and internally
      work with byte offsets, and then try to work with the page index by
      turning it into a byte offset with "pgoff << PAGE_SHIFT".
      
      Which obviously can overflow.
      
      Adding the size of the mapping to it to get the byte offset of the end
      of the backing store just exacerbates the problem, and if you then use
      this overflow-prone value to check various limits of your device driver
      mmap capability, you're just setting yourself up for problems.
      
      The correct thing for drivers to do is to do their limit math in page
      indices, the way the interface is designed.  Because the generic mmap
      code _does_ test that the index doesn't overflow, since that's what the
      mmap code really cares about.
      
      HOWEVER.
      
      Finding and fixing various random drivers is a sisyphean task, so let's
      just see if we can just make the core mmap() code do the limiting for
      us.  Realistically, the only "big" backing stores we need to care about
      are regular files and block devices, both of which are known to do this
      properly, and which have nice well-defined limits for how much data they
      can access.
      
      So let's special-case just those two known cases, and then limit other
      random mmap users to a backing store that still fits in "unsigned long".
      Realistically, that's not much of a limit at all on 64-bit, and on
      32-bit architectures the only worry might be the GPU drivers, which can
      have big physical address spaces.
      
      To make it possible for drivers like that to say that they are 64-bit
      clean, this patch does repurpose the "FMODE_UNSIGNED_OFFSET" bit in the
      file flags to allow drivers to mark their file descriptors as safe in
      the full 64-bit mmap address space.
      
      [ The timing for doing this is less than optimal, and this should really
        go in a merge window. But realistically, this needs wide testing more
        than it needs anything else, and being main-line is the only way to do
        that.
      
        So the earlier the better, even if it's outside the proper development
        cycle        - Linus ]
      
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Willy Tarreau <w@1wt.eu>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      be83bbf8
    • L
      Merge tag 'pm-4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 41e3e108
      Linus Torvalds 提交于
      Pull power management fixes from Rafael Wysocki:
       "These fix two PCI power management regressions from the 4.13 cycle and
        one cpufreq schedutil governor bug introduced during the 4.12 cycle,
        drop a stale comment from the schedutil code and fix two mistakes in
        docs.
      
        Specifics:
      
         - Restore device_may_wakeup() check in pci_enable_wake() removed
           inadvertently during the 4.13 cycle to prevent systems from drawing
           excessive power when suspended or off, among other things (Rafael
           Wysocki).
      
         - Fix pci_dev_run_wake() to properly handle devices that only can
           signal PME# when in the D3cold power state (Kai Heng Feng).
      
         - Fix the schedutil cpufreq governor to avoid using UINT_MAX as the
           new CPU frequency in some cases due to a missing check (Rafael
           Wysocki).
      
         - Remove a stale comment regarding worker kthreads from the schedutil
           cpufreq governor (Juri Lelli).
      
         - Fix a copy-paste mistake in the intel_pstate driver documentation
           (Juri Lelli).
      
         - Fix a typo in the system sleep states documentation (Jonathan
           Neuschäfer)"
      
      * tag 'pm-4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PCI / PM: Check device_may_wakeup() in pci_enable_wake()
        PCI / PM: Always check PME wakeup capability for runtime wakeup support
        cpufreq: schedutil: Avoid using invalid next_freq
        cpufreq: schedutil: remove stale comment
        PM: docs: intel_pstate: fix Active Mode w/o HWP paragraph
        PM: docs: sleep-states: Fix a typo ("includig")
      41e3e108
    • L
      Merge tag 'mtd/fixes-for-4.17-rc5' of git://git.infradead.org/linux-mtd · e03dc5d3
      Linus Torvalds 提交于
      Pull mtd fixes from Boris Brezillon:
      
       - make nand_soft_waitrdy() wait tWB before polling the status REG
      
       - fix BCH write in the the Marvell NAND controller driver
      
       - fix wrong picosec to msec conversion in the Marvell NAND controller
         driver
      
       - fix DMA handling in the TI OneNAND controllre driver
      
      * tag 'mtd/fixes-for-4.17-rc5' of git://git.infradead.org/linux-mtd:
        mtd: rawnand: Make sure we wait tWB before polling the STATUS reg
        mtd: rawnand: marvell: fix command xtype in BCH write hook
        mtd: rawnand: marvell: pass ms delay to wait_op
        mtd: onenand: omap2: Disable DMA for HIGHMEM buffers
      e03dc5d3
    • L
      Merge tag 'drm-fixes-for-v4.17-rc5' of git://people.freedesktop.org/~airlied/linux · ca30093d
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "nouveau, amdgpu, i915, vc4, omap, exynos and atomic fixes.
      
        As last week seemed a bit slow, we got a few more fixes this week.
      
        The main stuff is two weeks of fixes for amdgpu, some missing bits of
        vega12 atom firmware support were added, and some power management
        fixes.
      
        Nouveau got two regression fixes for an DP MST deadlock and a random
        oops fix.
      
        i915 got an LVDS panel timeout fix 2 WARN fixes.
      
        exynos fixed a pagefault issue in the mixer driver.
      
        vc4 has an oops fix.
      
        omap had a bunch of uninit var and error-checking fixes. Two atomic
        modesetting state fixes.
      
        One minor agp cleanup patch"
      
      * tag 'drm-fixes-for-v4.17-rc5' of git://people.freedesktop.org/~airlied/linux: (30 commits)
        drm/amd/pp: Fix performance drop on Fiji
        drm/nouveau: Fix deadlock in nv50_mstm_register_connector()
        drm/nouveau/ttm: don't dereference nvbo::cli, it can outlive client
        agp: uninorth: make two functions static
        drm/amd/pp: Refine the output of pp_power_profile_mode on VI
        drm/amdgpu: Switch to interruptable wait to recover from ring hang.
        drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages
        drm/amd/display: Use kvzalloc for potentially large allocations
        drm/amd/display: Don't return ddc result and read_bytes in same return value
        drm/amd/display: Add get_firmware_info_v3_2 for VG12
        drm/amd: Add BIOS smu_info v3_3 required struct def.
        drm/amd/display: Add VG12 ASIC IDs
        drm/vc4: Fix scaling of uni-planar formats
        drm/exynos: hdmi: avoid duplicating drm_bridge_attach
        drm/i915: Fix drm:intel_enable_lvds ERROR message in kernel log
        drm/i915: Correctly populate user mode h/vdisplay with pipe src size during readout
        drm/i915: Adjust eDP's logical vco in a reliable place.
        drm/bridge/sii8620: add Kconfig dependency on extcon
        drm/omap: handle alloc failures in omap_connector
        drm/omap: add missing linefeeds to prints
        ...
      ca30093d
  2. 11 5月, 2018 5 次提交
  3. 10 5月, 2018 24 次提交
    • M
      dm thin: update Documentation to clarify when "read_only" is valid · 28700a36
      Mike Snitzer 提交于
      Due to user confusion, clarify that it doesn't make sense to try to
      create a thin-pool with "read_only" mode enabled.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      28700a36
    • R
      PCI / PM: Check device_may_wakeup() in pci_enable_wake() · cfcadfaa
      Rafael J. Wysocki 提交于
      Commit 0847684c (PCI / PM: Simplify device wakeup settings code)
      went too far and dropped the device_may_wakeup() check from
      pci_enable_wake() which causes wakeup to be enabled during system
      suspend, hibernation or shutdown for some PCI devices that are not
      allowed by user space to wake up the system from sleep (or power off).
      
      As a result of this, excessive power is drawn by some of the affected
      systems while in sleep states or off.
      
      Restore the device_may_wakeup() check in pci_enable_wake(), but make
      sure that the PCI bus type's runtime suspend callback will not call
      device_may_wakeup() which is about system wakeup from sleep and not
      about device wakeup from runtime suspend.
      
      Fixes: 0847684c (PCI / PM: Simplify device wakeup settings code)
      Reported-by: NJoseph Salisbury <joseph.salisbury@canonical.com>
      Cc: 4.13+ <stable@vger.kernel.org> # 4.13+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      cfcadfaa
    • R
      drm/amd/pp: Fix performance drop on Fiji · 7fc6311b
      Rex Zhu 提交于
      The performance drop if the default TDP more than 256 Watt
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NJunwei Zhang <Jerry.Zhang@amd.com>
      Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7fc6311b
    • I
      ceph: fix iov_iter issues in ceph_direct_read_write() · fc218544
      Ilya Dryomov 提交于
      dio_get_pagev_size() and dio_get_pages_alloc() introduced in commit
      b5b98989 ("ceph: combine as many iovec as possile into one OSD
      request") assume that the passed iov_iter is ITER_IOVEC.  This isn't
      the case with splice where it ends up poking into the guts of ITER_BVEC
      or ITER_PIPE iterators, causing lockups and crashes easily reproduced
      with generic/095.
      
      Rather than trying to figure out gap alignment and stuff pages into
      a page vector, add a helper for going from iov_iter to a bio_vec array
      and make use of the new CEPH_OSD_DATA_TYPE_BVECS code.
      
      Fixes: b5b98989 ("ceph: combine as many iovec as possile into one OSD request")
      Link: http://tracker.ceph.com/issues/18130Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: N"Yan, Zheng" <zyan@redhat.com>
      Tested-by: NLuis Henriques <lhenriques@suse.com>
      fc218544
    • I
      libceph: add osd_req_op_extent_osd_data_bvecs() · 0010f705
      Ilya Dryomov 提交于
      ... and store num_bvecs for client code's convenience.
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: N"Yan, Zheng" <zyan@redhat.com>
      0010f705
    • I
      ceph: fix rsize/wsize capping in ceph_direct_read_write() · 3a15b38f
      Ilya Dryomov 提交于
      rsize/wsize cap should be applied before ceph_osdc_new_request() is
      called.  Otherwise, if the size is limited by the cap instead of the
      stripe unit, ceph_osdc_new_request() would setup an extent op that is
      bigger than what dio_get_pages_alloc() would pin and add to the page
      vector, triggering asserts in the messenger.
      
      Cc: stable@vger.kernel.org
      Fixes: 95cca2b4 ("ceph: limit osd write size")
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: N"Yan, Zheng" <zyan@redhat.com>
      3a15b38f
    • B
      mtd: rawnand: Make sure we wait tWB before polling the STATUS reg · 3057fcef
      Boris Brezillon 提交于
      NAND chips require a bit of time to take the NAND operation into
      account and set the BUSY bit in the STATUS reg. Make sure we don't poll
      the STATUS reg too early in nand_soft_waitrdy().
      
      Fixes: 8878b126 ("mtd: nand: add ->exec_op() implementation")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      Acked-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      3057fcef
    • D
      Merge branch 'linux-4.17' of git://github.com/skeggsb/linux into drm-fixes · 7c2b1341
      Dave Airlie 提交于
      Two nouveau crasher/deadlock fixes.
      
      * 'linux-4.17' of git://github.com/skeggsb/linux:
        drm/nouveau: Fix deadlock in nv50_mstm_register_connector()
        drm/nouveau/ttm: don't dereference nvbo::cli, it can outlive client
      7c2b1341
    • L
      drm/nouveau: Fix deadlock in nv50_mstm_register_connector() · 352672db
      Lyude Paul 提交于
      Currently; we're grabbing all of the modesetting locks before adding MST
      connectors to fbdev. This isn't actually necessary, and causes a
      deadlock as well:
      
      ======================================================
      WARNING: possible circular locking dependency detected
      4.17.0-rc3Lyude-Test+ #1 Tainted: G           O
      ------------------------------------------------------
      kworker/1:0/18 is trying to acquire lock:
      00000000c832f62d (&helper->lock){+.+.}, at: drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
      
      but task is already holding lock:
      00000000942e28e2 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_backoff+0x8e/0x1c0 [drm]
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #3 (crtc_ww_class_mutex){+.+.}:
             ww_mutex_lock+0x43/0x80
             drm_modeset_lock+0x71/0x130 [drm]
             drm_helper_probe_single_connector_modes+0x7d/0x6b0 [drm_kms_helper]
             drm_setup_crtcs+0x15e/0xc90 [drm_kms_helper]
             __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper]
             nouveau_fbcon_init+0x138/0x1a0 [nouveau]
             nouveau_drm_load+0x173/0x7e0 [nouveau]
             drm_dev_register+0x134/0x1c0 [drm]
             drm_get_pci_dev+0x8e/0x160 [drm]
             nouveau_drm_probe+0x1a9/0x230 [nouveau]
             pci_device_probe+0xcd/0x150
             driver_probe_device+0x30b/0x480
             __driver_attach+0xbc/0xe0
             bus_for_each_dev+0x67/0x90
             bus_add_driver+0x164/0x260
             driver_register+0x57/0xc0
             do_one_initcall+0x4d/0x323
             do_init_module+0x5b/0x1f8
             load_module+0x20e5/0x2ac0
             __do_sys_finit_module+0xb7/0xd0
             do_syscall_64+0x60/0x1b0
             entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      -> #2 (crtc_ww_class_acquire){+.+.}:
             drm_helper_probe_single_connector_modes+0x58/0x6b0 [drm_kms_helper]
             drm_setup_crtcs+0x15e/0xc90 [drm_kms_helper]
             __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper]
             nouveau_fbcon_init+0x138/0x1a0 [nouveau]
             nouveau_drm_load+0x173/0x7e0 [nouveau]
             drm_dev_register+0x134/0x1c0 [drm]
             drm_get_pci_dev+0x8e/0x160 [drm]
             nouveau_drm_probe+0x1a9/0x230 [nouveau]
             pci_device_probe+0xcd/0x150
             driver_probe_device+0x30b/0x480
             __driver_attach+0xbc/0xe0
             bus_for_each_dev+0x67/0x90
             bus_add_driver+0x164/0x260
             driver_register+0x57/0xc0
             do_one_initcall+0x4d/0x323
             do_init_module+0x5b/0x1f8
             load_module+0x20e5/0x2ac0
             __do_sys_finit_module+0xb7/0xd0
             do_syscall_64+0x60/0x1b0
             entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      -> #1 (&dev->mode_config.mutex){+.+.}:
             drm_setup_crtcs+0x10c/0xc90 [drm_kms_helper]
             __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper]
             nouveau_fbcon_init+0x138/0x1a0 [nouveau]
             nouveau_drm_load+0x173/0x7e0 [nouveau]
             drm_dev_register+0x134/0x1c0 [drm]
             drm_get_pci_dev+0x8e/0x160 [drm]
             nouveau_drm_probe+0x1a9/0x230 [nouveau]
             pci_device_probe+0xcd/0x150
             driver_probe_device+0x30b/0x480
             __driver_attach+0xbc/0xe0
             bus_for_each_dev+0x67/0x90
             bus_add_driver+0x164/0x260
             driver_register+0x57/0xc0
             do_one_initcall+0x4d/0x323
             do_init_module+0x5b/0x1f8
             load_module+0x20e5/0x2ac0
             __do_sys_finit_module+0xb7/0xd0
             do_syscall_64+0x60/0x1b0
             entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      -> #0 (&helper->lock){+.+.}:
             __mutex_lock+0x70/0x9d0
             drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
             nv50_mstm_register_connector+0x2c/0x50 [nouveau]
             drm_dp_add_port+0x2f5/0x420 [drm_kms_helper]
             drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
             drm_dp_add_port+0x33f/0x420 [drm_kms_helper]
             drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
             drm_dp_check_and_send_link_address+0x87/0xd0 [drm_kms_helper]
             drm_dp_mst_link_probe_work+0x4d/0x80 [drm_kms_helper]
             process_one_work+0x20d/0x650
             worker_thread+0x3a/0x390
             kthread+0x11e/0x140
             ret_from_fork+0x3a/0x50
      
      other info that might help us debug this:
      Chain exists of:
        &helper->lock --> crtc_ww_class_acquire --> crtc_ww_class_mutex
       Possible unsafe locking scenario:
             CPU0                    CPU1
             ----                    ----
        lock(crtc_ww_class_mutex);
                                     lock(crtc_ww_class_acquire);
                                     lock(crtc_ww_class_mutex);
        lock(&helper->lock);
      
       *** DEADLOCK ***
      5 locks held by kworker/1:0/18:
       #0: 000000004a05cd50 ((wq_completion)"events_long"){+.+.}, at: process_one_work+0x187/0x650
       #1: 00000000601c11d1 ((work_completion)(&mgr->work)){+.+.}, at: process_one_work+0x187/0x650
       #2: 00000000586ca0df (&dev->mode_config.mutex){+.+.}, at: drm_modeset_lock_all+0x3a/0x1b0 [drm]
       #3: 00000000d3ca0ffa (crtc_ww_class_acquire){+.+.}, at: drm_modeset_lock_all+0x44/0x1b0 [drm]
       #4: 00000000942e28e2 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_backoff+0x8e/0x1c0 [drm]
      
      stack backtrace:
      CPU: 1 PID: 18 Comm: kworker/1:0 Tainted: G           O      4.17.0-rc3Lyude-Test+ #1
      Hardware name: Gateway FX6840/FX6840, BIOS P01-A3         05/17/2010
      Workqueue: events_long drm_dp_mst_link_probe_work [drm_kms_helper]
      Call Trace:
       dump_stack+0x85/0xcb
       print_circular_bug.isra.38+0x1ce/0x1db
       __lock_acquire+0x128f/0x1350
       ? lock_acquire+0x9f/0x200
       ? lock_acquire+0x9f/0x200
       ? __ww_mutex_lock.constprop.13+0x8f/0x1000
       lock_acquire+0x9f/0x200
       ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       __mutex_lock+0x70/0x9d0
       ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       ? ww_mutex_lock+0x43/0x80
       ? _cond_resched+0x15/0x30
       ? ww_mutex_lock+0x43/0x80
       ? drm_modeset_lock+0xb2/0x130 [drm]
       ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       nv50_mstm_register_connector+0x2c/0x50 [nouveau]
       drm_dp_add_port+0x2f5/0x420 [drm_kms_helper]
       ? mark_held_locks+0x50/0x80
       ? kfree+0xcf/0x2a0
       ? drm_dp_check_mstb_guid+0xd6/0x120 [drm_kms_helper]
       ? trace_hardirqs_on_caller+0xed/0x180
       ? drm_dp_check_mstb_guid+0xd6/0x120 [drm_kms_helper]
       drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
       drm_dp_add_port+0x33f/0x420 [drm_kms_helper]
       ? nouveau_connector_aux_xfer+0x7c/0xb0 [nouveau]
       ? find_held_lock+0x2d/0x90
       ? drm_dp_dpcd_access+0xd9/0xf0 [drm_kms_helper]
       ? __mutex_unlock_slowpath+0x3b/0x280
       ? drm_dp_dpcd_access+0xd9/0xf0 [drm_kms_helper]
       drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
       drm_dp_check_and_send_link_address+0x87/0xd0 [drm_kms_helper]
       drm_dp_mst_link_probe_work+0x4d/0x80 [drm_kms_helper]
       process_one_work+0x20d/0x650
       worker_thread+0x3a/0x390
       ? process_one_work+0x650/0x650
       kthread+0x11e/0x140
       ? kthread_create_worker_on_cpu+0x50/0x50
       ret_from_fork+0x3a/0x50
      
      Taking example from i915, the only time we need to hold any modesetting
      locks is when changing the port on the mstc, and in that case we only
      need to hold the connection mutex.
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Karol Herbst <kherbst@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      352672db
    • B
      drm/nouveau/ttm: don't dereference nvbo::cli, it can outlive client · 0d5a03c3
      Ben Skeggs 提交于
      Potentially responsible for some random OOPSes.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Cc: stable@vger.kernel.org [v4.15+]
      0d5a03c3
    • D
      Merge branch 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · 5c0e0b45
      Dave Airlie 提交于
      A little bigger than normal since this is two weeks of fixes.
      - Atom firmware table updates for vega12
      - Fix fallout from huge page support
      - Fix up smu7 power profile interface to be consistent with vega
      - Misc other fixes
      
      * 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux:
        drm/amd/pp: Refine the output of pp_power_profile_mode on VI
        drm/amdgpu: Switch to interruptable wait to recover from ring hang.
        drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages
        drm/amd/display: Use kvzalloc for potentially large allocations
        drm/amd/display: Don't return ddc result and read_bytes in same return value
        drm/amd/display: Add get_firmware_info_v3_2 for VG12
        drm/amd: Add BIOS smu_info v3_3 required struct def.
        drm/amd/display: Add VG12 ASIC IDs
      5c0e0b45
    • D
      Merge tag 'drm-misc-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 44ef02c2
      Dave Airlie 提交于
      atomic: Clear state pointers on clear (Ville)
      vc4: Fix oops in dpi disable (Eric)
      omap: Various error-checking + uninitialized var fixes (Tomi)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      
      * tag 'drm-misc-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-misc:
        drm/vc4: Fix scaling of uni-planar formats
        drm/bridge/sii8620: add Kconfig dependency on extcon
        drm/omap: handle alloc failures in omap_connector
        drm/omap: add missing linefeeds to prints
        drm/omap: handle error if scale coefs are not found
        drm/omap: check return value from soc_device_match
        drm/omap: fix possible NULL ref issue in tiler_reserve_2d
        drm/omap: fix uninitialized ret variable
        drm/omap: silence unititialized variable warning
        drm/vc4: Fix oops dereferencing DPI's connector since panel_bridge.
        drm/atomic: Clean private obj old_state/new_state in drm_atomic_state_default_clear()
        drm/atomic: Clean old_state/new_state in drm_atomic_state_default_clear()
      44ef02c2
    • D
      Merge tag 'drm-intel-fixes-2018-05-09' of... · 03a0a3e5
      Dave Airlie 提交于
      Merge tag 'drm-intel-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Increase LVDS panel timeout to 5s to avoid spurious *ERROR*
      - Fix 2 WARNS: BIOS framebuffer related (FDO #105992) and eDP cdclk mismatch
      
      * tag 'drm-intel-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-intel:
        drm/i915: Fix drm:intel_enable_lvds ERROR message in kernel log
        drm/i915: Correctly populate user mode h/vdisplay with pipe src size during readout
        drm/i915: Adjust eDP's logical vco in a reliable place.
      03a0a3e5
    • D
      Merge tag 'exynos-drm-fixes-for-v4.17-rc5' of... · 87bf742b
      Dave Airlie 提交于
      Merge tag 'exynos-drm-fixes-for-v4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      Fixup pagefault issue of mixer driver
      - it makes sure to check shadow register for interlace scan.
      - it corrects chroma_addr[1], height and vertical position values.
      And trivial cleanup
      - it just removes duplicated drm_bridge_attach.
      
      * tag 'exynos-drm-fixes-for-v4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: hdmi: avoid duplicating drm_bridge_attach
        drm/exynos: mixer: avoid Oops in vp_video_buffer()
        drm/exynos/mixer: fix synchronization check in interlaced mode
      87bf742b
    • M
      agp: uninorth: make two functions static · dec60f3a
      Mathieu Malaterre 提交于
      Both ‘uninorth_remove_memory’ and ‘null_cache_flush’ can be made
      static. So make them.
      
      Silence the following gcc warning (W=1):
      
        drivers/char/agp/uninorth-agp.c:198:5: warning: no previous prototype for ‘uninorth_remove_memory’ [-Wmissing-prototypes]
      
      and
      
        drivers/char/agp/uninorth-agp.c:473:6: warning: no previous prototype for ‘null_cache_flush’ [-Wmissing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dec60f3a
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 008464a9
      Linus Torvalds 提交于
      Pull HID fixes from Jiri Kosina:
      
       - quirk for Toshiba Click Mini L9W-B, from Hans de Goede
      
       - intel-ish-hid and wacom error handling (device freeing) path fixes
         from Arvind Yadav
      
       - memory corruption fix in intel-ish-hid driver from Hans de Goede
      
       - a few new device ID additions to hid-lenovo from Peter Ganzhorn
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: i2c-hid: Add RESEND_REPORT_DESCR quirk for Toshiba Click Mini L9W-B
        HID: intel-ish-hid: use put_device() instead of kfree()
        HID: intel_ish-hid: Stop using a static local buffer in get_report()
        HID: intel_ish-hid: Move header size check to inside the loop
        HID: wacom: Release device resource data obtained by devres_alloc()
        HID: lenovo: Add support for IBM/Lenovo Scrollpoint mice
      008464a9
    • R
      drm/amd/pp: Refine the output of pp_power_profile_mode on VI · 639f7902
      Rex Zhu 提交于
      In order to keep consist with Vega,
      the output format of the pp_power_profile_mode would be
      <integer><mode name string>< “*” for current profile>:"detail settings"
      and remove the "CURRENT" mode line.
      
      for example:
      NUM        MODE_NAME     SCLK_UP_HYST   SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL     MCLK_UP_HYST   MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL
        0   3D_FULL_SCREEN:        0              100               30                0              100               10
        1     POWER_SAVING:       10                0               30                -                -                -
        2            VIDEO:        -                -                -               10               16               31
        3               VR:        0               11               50                0              100               10
        4          COMPUTE:        0                5               30                -                -                -
        5         CUSTOM *:        0                5               30                0              100               10
      NUM        MODE_NAME     SCLK_UP_HYST   SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL     MCLK_UP_HYST   MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL
        0   3D_FULL_SCREEN:        0              100               30                0              100               10
        1   POWER_SAVING *:       10                0               30                0              100               10
        2            VIDEO:        -                -                -               10               16               31
        3               VR:        0               11               50                0              100               10
        4          COMPUTE:        0                5               30                -                -                -
        5           CUSTOM:        -                -                -                -                -                -
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      639f7902
    • A
      drm/amdgpu: Switch to interruptable wait to recover from ring hang. · e6a5b9f9
      Andrey Grodzovsky 提交于
      v2:
      Use dma_fence_wait instead of dma_fence_wait_timeout(...,MAX_SCHEDULE_TIMEOUT)
      Avoid printing error message for ERESTARTSYS
      Originally-by: NDavid Panariti <David.Panariti@amd.com>
      Signed-off-by: NAndrey Grodzovsky <andrey.grodzovsky@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      e6a5b9f9
    • M
      drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages · da291320
      Michel Dänzer 提交于
      GFP_TRANSHUGE tries very hard to allocate huge pages, which can result
      in long delays with high memory pressure. I have observed firefox
      freezing for up to around a minute due to this while restic was taking
      a full system backup.
      
      Since we don't really need huge pages, use GFP_TRANSHUGE_LIGHT |
      __GFP_NORETRY instead, in order to fail quickly when there are no huge
      pages available.
      
      Set __GFP_KSWAPD_RECLAIM as well, in order for huge pages to be freed
      up in the background if necessary.
      
      With these changes, I'm no longer seeing freezes during a restic backup.
      
      Cc: stable@vger.kernel.org
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      da291320
    • M
      drm/amd/display: Use kvzalloc for potentially large allocations · bd4caed4
      Michel Dänzer 提交于
      Allocating up to 32 physically contiguous pages can easily fail (and has
      failed for me), and isn't necessary anyway.
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      bd4caed4
    • H
    • H
    • J
    • H