1. 05 12月, 2020 5 次提交
    • L
      Merge tag 'for-5.10/dm-fixes' of... · b3298500
      Linus Torvalds 提交于
      Merge tag 'for-5.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - Fix DM's bio splitting changes that were made during v5.9. This
         restores splitting in terms of varied per-target ti->max_io_len
         rather than use block core's single stacked 'chunk_sectors' limit.
      
       - Like DM crypt, update DM integrity to not use crypto drivers that
         have CRYPTO_ALG_ALLOCATES_MEMORY set.
      
       - Fix DM writecache target's argument parsing and status display.
      
       - Remove needless BUG() from dm writecache's persistent_memory_claim()
      
       - Remove old gcc workaround in DM cache target's block_div() for ARM
         link errors now that gcc >= 4.9 is required.
      
       - Fix RCU locking in dm_blk_report_zones and dm_dax_zero_page_range.
      
       - Remove old, and now frowned upon, BUG_ON(in_interrupt()) in
         dm_table_event().
      
       - Remove invalid sparse annotations from dm_prepare_ioctl() and
         dm_unprepare_ioctl().
      
      * tag 'for-5.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm: remove invalid sparse __acquires and __releases annotations
        dm: fix double RCU unlock in dm_dax_zero_page_range() error path
        dm: fix IO splitting
        dm writecache: remove BUG() and fail gracefully instead
        dm table: Remove BUG_ON(in_interrupt())
        dm: fix bug with RCU locking in dm_blk_report_zones
        Revert "dm cache: fix arm link errors with inline"
        dm writecache: fix the maximum number of arguments
        dm writecache: advance the number of arguments when reporting max_age
        dm integrity: don't use drivers that have CRYPTO_ALG_ALLOCATES_MEMORY
      b3298500
    • M
      dm: remove invalid sparse __acquires and __releases annotations · bde3808b
      Mike Snitzer 提交于
      Fixes sparse warnings:
      drivers/md/dm.c:508:12: warning: context imbalance in 'dm_prepare_ioctl' - wrong count at exit
      drivers/md/dm.c:543:13: warning: context imbalance in 'dm_unprepare_ioctl' - wrong count at exit
      
      Fixes: 971888c4 ("dm: hold DM table for duration of ioctl rather than use blkdev_get")
      Cc: stable@vger.kernel.org
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      bde3808b
    • M
      dm: fix double RCU unlock in dm_dax_zero_page_range() error path · f05c4403
      Mike Snitzer 提交于
      Remove redundant dm_put_live_table() in dm_dax_zero_page_range() error
      path to fix sparse warning:
      drivers/md/dm.c:1208:9: warning: context imbalance in 'dm_dax_zero_page_range' - unexpected unlock
      
      Fixes: cdf6cdcd ("dm,dax: Add dax zero_page_range operation")
      Cc: stable@vger.kernel.org
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      f05c4403
    • M
      dm: fix IO splitting · 3ee16db3
      Mike Snitzer 提交于
      Commit 882ec4e6 ("dm table: stack 'chunk_sectors' limit to account
      for target-specific splitting") caused a couple regressions:
      1) Using lcm_not_zero() when stacking chunk_sectors was a bug because
         chunk_sectors must reflect the most limited of all devices in the
         IO stack.
      2) DM targets that set max_io_len but that do _not_ provide an
         .iterate_devices method no longer had there IO split properly.
      
      And commit 5091cdec ("dm: change max_io_len() to use
      blk_max_size_offset()") also caused a regression where DM no longer
      supported varied (per target) IO splitting. The implication being the
      potential for severely reduced performance for IO stacks that use a DM
      target like dm-cache to hide performance limitations of a slower
      device (e.g. one that requires 4K IO splitting).
      
      Coming full circle: Fix all these issues by discontinuing stacking
      chunk_sectors up using ti->max_io_len in dm_calculate_queue_limits(),
      add optional chunk_sectors override argument to blk_max_size_offset()
      and update DM's max_io_len() to pass ti->max_io_len to its
      blk_max_size_offset() call.
      
      Passing in an optional chunk_sectors override to blk_max_size_offset()
      allows for code reuse of block's centralized calculation for max IO
      size based on provided offset and split boundary.
      
      Fixes: 882ec4e6 ("dm table: stack 'chunk_sectors' limit to account for target-specific splitting")
      Fixes: 5091cdec ("dm: change max_io_len() to use blk_max_size_offset()")
      Cc: stable@vger.kernel.org
      Reported-by: NJohn Dorminy <jdorminy@redhat.com>
      Reported-by: NBruce Johnston <bjohnsto@redhat.com>
      Reported-by: NKirill Tkhai <ktkhai@virtuozzo.com>
      Reviewed-by: NJohn Dorminy <jdorminy@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Reviewed-by: NJens Axboe <axboe@kernel.dk>
      3ee16db3
    • L
      Merge tag 'drm-fixes-2020-12-04' of git://anongit.freedesktop.org/drm/drm · e87297fa
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "This week's regular fixes.
      
        i915 has fixes for a few races, use-after-free, and gpu hangs. Tegra
        just has some minor fixes that I didn't see much point in hanging on
        to. The nouveau fix is for all pre-nv50 cards and was reported a few
        times. Otherwise it's just some amdgpu, and a few misc fixes.
      
        Summary:
      
        amdgpu:
         - SMU11 manual fan fix
         - Renoir display clock fix
         - VCN3 dynamic powergating fix
      
        i915:
         - Program mocs:63 for cache eviction on gen9 (Chris)
         - Protect context lifetime with RCU (Chris)
         - Split the breadcrumb spinlock between global and contexts (Chris)
         - Retain default context state across shrinking (Venkata)
         - Limit frequency drop to RPe on parking (Chris)
         - Return earlier from intel_modeset_init() without display (Jani)
         - Defer initial modeset until after GGTT is initialized (Chris)
      
        nouveau:
         - pre-nv50 regression fix
      
        rockchip:
         - uninitialised LVDS property fix
      
        omap:
         - bridge fix
      
        panel:
         - race fix
      
        mxsfb:
         - fence sync fix
         - modifiers fix
      
        tegra:
         - idr init fix
         - sor fixes
         - output/of cleanup fix"
      
      * tag 'drm-fixes-2020-12-04' of git://anongit.freedesktop.org/drm/drm: (22 commits)
        drm/amdgpu/vcn3.0: remove old DPG workaround
        drm/amdgpu/vcn3.0: stall DPG when WPTR/RPTR reset
        drm/amd/display: Init clock value by current vbios CLKs
        drm/amdgpu/pm/smu11: Fix fan set speed bug
        drm/i915/display: Defer initial modeset until after GGTT is initialised
        drm/i915/display: return earlier from intel_modeset_init() without display
        drm/i915/gt: Limit frequency drop to RPe on parking
        drm/i915/gt: Retain default context state across shrinking
        drm/i915/gt: Split the breadcrumb spinlock between global and contexts
        drm/i915/gt: Protect context lifetime with RCU
        drm/i915/gt: Program mocs:63 for cache eviction on gen9
        drm/omap: sdi: fix bridge enable/disable
        drm/panel: sony-acx565akm: Fix race condition in probe
        drm/rockchip: Avoid uninitialized use of endpoint id in LVDS
        drm/tegra: sor: Disable clocks on error in tegra_sor_init()
        drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve
        drm: mxsfb: Implement .format_mod_supported
        drm: mxsfb: fix fence synchronization
        drm/tegra: output: Do not put OF node twice
        drm/tegra: replace idr_init() by idr_init_base()
        ...
      e87297fa
  2. 04 12月, 2020 21 次提交
  3. 03 12月, 2020 14 次提交
    • B
      drm/amdgpu/vcn3.0: remove old DPG workaround · efd6d85a
      Boyuan Zhang 提交于
      Port from VCN2.5
      SCRATCH2 is used to keep decode wptr as a workaround
      which fix a hardware DPG decode wptr update bug for
      vcn2.5 beforehand.
      Signed-off-by: NBoyuan Zhang <boyuan.zhang@amd.com>
      Reviewed-by: NJames Zhu <James.Zhu@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 5.9.x
      efd6d85a
    • B
      drm/amdgpu/vcn3.0: stall DPG when WPTR/RPTR reset · ac2db948
      Boyuan Zhang 提交于
      Port from VCN2.5
      Add vcn dpg harware synchronization to fix race condition
      issue between vcn driver and hardware.
      Signed-off-by: NBoyuan Zhang <boyuan.zhang@amd.com>
      Reviewed-by: NJames Zhu <James.Zhu@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 5.9.x
      ac2db948
    • B
      drm/amd/display: Init clock value by current vbios CLKs · 7e0b367d
      Brandon Syu 提交于
      [Why]
      While booting into OS, driver updates DPP/DISP CLKs.
      But init clock value is zero which is invalid.
      
      [How]
      Get current clocks value to update init clocks.
      To avoid underflow.
      Signed-off-by: NBrandon Syu <Brandon.Syu@amd.com>
      Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
      Acked-by: NAurabindo Pillai <aurabindo.pillai@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7e0b367d
    • A
      drm/amdgpu/pm/smu11: Fix fan set speed bug · acab02c1
      Arunpravin 提交于
      Fix fan set speed calculation.
      Suggested-by: NKenneth Feng <kenneth.feng@amd.com>
      Signed-off-by: NArunpravin <Arunpravin.PaneerSelvam@amd.com>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NKenneth Feng <kenneth.feng@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      acab02c1
    • Z
      vxlan: fix error return code in __vxlan_dev_create() · 832e0979
      Zhang Changzhong 提交于
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: 0ce1822c ("vxlan: add adjacent link to limit depth level")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Link: https://lore.kernel.org/r/1606903122-2098-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      832e0979
    • Z
      net: pasemi: fix error return code in pasemi_mac_open() · aba84871
      Zhang Changzhong 提交于
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: 72b05b99 ("pasemi_mac: RX/TX ring management cleanup")
      Fixes: 8d636d8b ("pasemi_mac: jumbo frame support")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Link: https://lore.kernel.org/r/1606903035-1838-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      aba84871
    • Z
      cxgb3: fix error return code in t3_sge_alloc_qset() · ff992489
      Zhang Changzhong 提交于
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: b1fb1f28 ("cxgb3 - Fix dma mapping error path")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Acked-by: NRaju Rangoju <rajur@chelsio.com>
      Link: https://lore.kernel.org/r/1606902965-1646-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      ff992489
    • D
      Merge tag 'drm/tegra/for-5.10-rc7' of ssh://git.freedesktop.org/git/tegra/linux into drm-fixes · aac06646
      Dave Airlie 提交于
      drm/tegra: Fixes for v5.10-rc7
      
      This is a set of small fixes for various issues found during the last
      couple of weeks.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      
      From: Thierry Reding <thierry.reding@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201127145324.125776-1-thierry.reding@gmail.com
      aac06646
    • D
      net/x25: prevent a couple of overflows · 6ee50c8e
      Dan Carpenter 提交于
      The .x25_addr[] address comes from the user and is not necessarily
      NUL terminated.  This leads to a couple problems.  The first problem is
      that the strlen() in x25_bind() can read beyond the end of the buffer.
      
      The second problem is more subtle and could result in memory corruption.
      The call tree is:
        x25_connect()
        --> x25_write_internal()
            --> x25_addr_aton()
      
      The .x25_addr[] buffers are copied to the "addresses" buffer from
      x25_write_internal() so it will lead to stack corruption.
      
      Verify that the strings are NUL terminated and return -EINVAL if they
      are not.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Fixes: a9288525 ("X25: Dont let x25_bind use addresses containing characters")
      Reported-by: N"kiyin(尹亮)" <kiyin@tencent.com>
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NMartin Schiller <ms@dev.tdt.de>
      Link: https://lore.kernel.org/r/X8ZeAKm8FnFpN//B@mwandaSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      6ee50c8e
    • L
      Merge tag 'gfs2-v5.10-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 34816d20
      Linus Torvalds 提交于
      Pull gfs2 fixes from Andreas Gruenbacher:
       "Various gfs2 fixes"
      
      * tag 'gfs2-v5.10-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Fix deadlock between gfs2_{create_inode,inode_lookup} and delete_work_func
        gfs2: Upgrade shared glocks for atime updates
        gfs2: Don't freeze the file system during unmount
        gfs2: check for empty rgrp tree in gfs2_ri_update
        gfs2: set lockdep subclass for iopen glocks
        gfs2: Fix deadlock dumping resource group glocks
      34816d20
    • C
      drm/i915/display: Defer initial modeset until after GGTT is initialised · ccc9e67a
      Chris Wilson 提交于
      Prior to sanitizing the GGTT, the only operations allowed in
      intel_display_init_nogem() are those to reserve the preallocated (and
      active) regions in the GGTT leftover from the BIOS. Trying to allocate a
      GGTT vma (such as intel_pin_and_fence_fb_obj during the initial modeset)
      may then conflict with other preallocated regions that have not yet been
      protected.
      
      Move the initial modesetting from the end of init_nogem to the beginning
      of init so that any vma pinning (either framebuffers or DSB, for example),
      is after the GGTT is ready to handle it.
      
      This will prevent the DSB object from being destroyed too early:
      
      [   53.449241] BUG: KASAN: use-after-free in i915_init_ggtt+0x324/0x9e0 [i915]
      [   53.449309] Read of size 8 at addr ffff88811b1e8070 by task systemd-udevd/345
      
      [   53.449399] CPU: 1 PID: 345 Comm: systemd-udevd Tainted: G        W         5.10.0-rc5+ #12
      [   53.449409] Call Trace:
      [   53.449418]  dump_stack+0x9a/0xcc
      [   53.449558]  ? i915_init_ggtt+0x324/0x9e0 [i915]
      [   53.449565]  print_address_description.constprop.0+0x3e/0x60
      [   53.449577]  ? _raw_spin_lock_irqsave+0x4e/0x50
      [   53.449718]  ? i915_init_ggtt+0x324/0x9e0 [i915]
      [   53.449849]  ? i915_init_ggtt+0x324/0x9e0 [i915]
      [   53.449857]  kasan_report.cold+0x1f/0x37
      [   53.449993]  ? i915_init_ggtt+0x324/0x9e0 [i915]
      [   53.450130]  i915_init_ggtt+0x324/0x9e0 [i915]
      [   53.450273]  ? i915_ggtt_suspend+0x1f0/0x1f0 [i915]
      [   53.450281]  ? static_obj+0x69/0x80
      [   53.450289]  ? lockdep_init_map_waits+0xa9/0x310
      [   53.450431]  ? intel_wopcm_init+0x96/0x3d0 [i915]
      [   53.450581]  ? i915_gem_init+0x75/0x2d0 [i915]
      [   53.450720]  i915_gem_init+0x75/0x2d0 [i915]
      [   53.450852]  i915_driver_probe+0x8c2/0x1210 [i915]
      [   53.450993]  ? i915_pm_prepare+0x630/0x630 [i915]
      [   53.451006]  ? check_chain_key+0x1e7/0x2e0
      [   53.451025]  ? __pm_runtime_resume+0x58/0xb0
      [   53.451157]  i915_pci_probe+0xa6/0x2b0 [i915]
      [   53.451285]  ? i915_pci_remove+0x40/0x40 [i915]
      [   53.451295]  ? lockdep_hardirqs_on_prepare+0x124/0x230
      [   53.451302]  ? _raw_spin_unlock_irqrestore+0x42/0x50
      [   53.451309]  ? lockdep_hardirqs_on+0xbf/0x130
      [   53.451315]  ? preempt_count_sub+0xf/0xb0
      [   53.451321]  ? _raw_spin_unlock_irqrestore+0x2f/0x50
      [   53.451335]  pci_device_probe+0xf9/0x190
      [   53.451350]  really_probe+0x17f/0x5b0
      [   53.451365]  driver_probe_device+0x13a/0x1c0
      [   53.451376]  device_driver_attach+0x82/0x90
      [   53.451386]  ? device_driver_attach+0x90/0x90
      [   53.451391]  __driver_attach+0xab/0x190
      [   53.451401]  ? device_driver_attach+0x90/0x90
      [   53.451407]  bus_for_each_dev+0xe4/0x140
      [   53.451414]  ? subsys_dev_iter_exit+0x10/0x10
      [   53.451423]  ? __list_add_valid+0x2b/0xa0
      [   53.451440]  bus_add_driver+0x227/0x2e0
      [   53.451454]  driver_register+0xd3/0x150
      [   53.451585]  i915_init+0x92/0xac [i915]
      [   53.451592]  ? 0xffffffffa0a20000
      [   53.451598]  do_one_initcall+0xb6/0x3b0
      [   53.451606]  ? trace_event_raw_event_initcall_finish+0x150/0x150
      [   53.451614]  ? __kasan_kmalloc.constprop.0+0xc2/0xd0
      [   53.451627]  ? kmem_cache_alloc_trace+0x4a4/0x8e0
      [   53.451634]  ? kasan_unpoison_shadow+0x33/0x40
      [   53.451649]  do_init_module+0xf8/0x350
      [   53.451662]  load_module+0x43de/0x47f0
      [   53.451716]  ? module_frob_arch_sections+0x20/0x20
      [   53.451731]  ? rw_verify_area+0x5f/0x130
      [   53.451780]  ? __do_sys_finit_module+0x10d/0x1a0
      [   53.451785]  __do_sys_finit_module+0x10d/0x1a0
      [   53.451792]  ? __ia32_sys_init_module+0x40/0x40
      [   53.451800]  ? seccomp_do_user_notification.isra.0+0x5c0/0x5c0
      [   53.451829]  ? rcu_read_lock_bh_held+0xb0/0xb0
      [   53.451835]  ? mark_held_locks+0x24/0x90
      [   53.451856]  do_syscall_64+0x33/0x80
      [   53.451863]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [   53.451868] RIP: 0033:0x7fde09b4470d
      [   53.451875] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 53 f7 0c 00 f7 d8 64 89 01 48
      [   53.451880] RSP: 002b:00007ffd6abc1718 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [   53.451890] RAX: ffffffffffffffda RBX: 000056444e528150 RCX: 00007fde09b4470d
      [   53.451895] RDX: 0000000000000000 RSI: 00007fde09a21ded RDI: 000000000000000f
      [   53.451899] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000
      [   53.451904] R10: 000000000000000f R11: 0000000000000246 R12: 00007fde09a21ded
      [   53.451909] R13: 0000000000000000 R14: 000056444e329200 R15: 000056444e528150
      
      [   53.451957] Allocated by task 345:
      [   53.451995]  kasan_save_stack+0x1b/0x40
      [   53.452001]  __kasan_kmalloc.constprop.0+0xc2/0xd0
      [   53.452006]  kmem_cache_alloc+0x1cd/0x8d0
      [   53.452146]  i915_vma_instance+0x126/0xb70 [i915]
      [   53.452304]  i915_gem_object_ggtt_pin_ww+0x222/0x3f0 [i915]
      [   53.452446]  intel_dsb_prepare+0x14f/0x230 [i915]
      [   53.452588]  intel_atomic_commit+0x183/0x690 [i915]
      [   53.452730]  intel_initial_commit+0x2bc/0x2f0 [i915]
      [   53.452871]  intel_modeset_init_nogem+0xa02/0x2af0 [i915]
      [   53.452995]  i915_driver_probe+0x8af/0x1210 [i915]
      [   53.453120]  i915_pci_probe+0xa6/0x2b0 [i915]
      [   53.453125]  pci_device_probe+0xf9/0x190
      [   53.453131]  really_probe+0x17f/0x5b0
      [   53.453136]  driver_probe_device+0x13a/0x1c0
      [   53.453142]  device_driver_attach+0x82/0x90
      [   53.453148]  __driver_attach+0xab/0x190
      [   53.453153]  bus_for_each_dev+0xe4/0x140
      [   53.453158]  bus_add_driver+0x227/0x2e0
      [   53.453164]  driver_register+0xd3/0x150
      [   53.453286]  i915_init+0x92/0xac [i915]
      [   53.453292]  do_one_initcall+0xb6/0x3b0
      [   53.453297]  do_init_module+0xf8/0x350
      [   53.453302]  load_module+0x43de/0x47f0
      [   53.453307]  __do_sys_finit_module+0x10d/0x1a0
      [   53.453312]  do_syscall_64+0x33/0x80
      [   53.453318]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      [   53.453345] Freed by task 82:
      [   53.453379]  kasan_save_stack+0x1b/0x40
      [   53.453384]  kasan_set_track+0x1c/0x30
      [   53.453389]  kasan_set_free_info+0x1b/0x30
      [   53.453394]  __kasan_slab_free+0x112/0x160
      [   53.453399]  kmem_cache_free+0xb2/0x3f0
      [   53.453536]  i915_gem_flush_free_objects+0x31a/0x3b0 [i915]
      [   53.453542]  process_one_work+0x519/0x9f0
      [   53.453547]  worker_thread+0x75/0x5c0
      [   53.453552]  kthread+0x1da/0x230
      [   53.453557]  ret_from_fork+0x22/0x30
      
      [   53.453584] The buggy address belongs to the object at ffff88811b1e8040
                      which belongs to the cache i915_vma of size 968
      [   53.453692] The buggy address is located 48 bytes inside of
                      968-byte region [ffff88811b1e8040, ffff88811b1e8408)
      [   53.453792] The buggy address belongs to the page:
      [   53.453842] page:00000000b35f7048 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88811b1ef940 pfn:0x11b1e8
      [   53.453847] head:00000000b35f7048 order:3 compound_mapcount:0 compound_pincount:0
      [   53.453853] flags: 0x8000000000010200(slab|head)
      [   53.453860] raw: 8000000000010200 ffff888115596248 ffff888115596248 ffff8881155b6340
      [   53.453866] raw: ffff88811b1ef940 0000000000170001 00000001ffffffff 0000000000000000
      [   53.453870] page dumped because: kasan: bad access detected
      
      [   53.453895] Memory state around the buggy address:
      [   53.453944]  ffff88811b1e7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      [   53.454011]  ffff88811b1e7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      [   53.454079] >ffff88811b1e8000: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
      [   53.454146]                                                              ^
      [   53.454211]  ffff88811b1e8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [   53.454279]  ffff88811b1e8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [   53.454347] ==================================================================
      [   53.454414] Disabling lock debugging due to kernel taint
      [   53.454434] general protection fault, probably for non-canonical address 0xdead0000000000d0: 0000 [#1] PREEMPT SMP KASAN PTI
      [   53.454446] CPU: 1 PID: 345 Comm: systemd-udevd Tainted: G    B   W         5.10.0-rc5+ #12
      [   53.454592] RIP: 0010:i915_init_ggtt+0x26f/0x9e0 [i915]
      [   53.454602] Code: 89 8d 48 ff ff ff 4c 8d 60 d0 49 39 c7 0f 84 37 02 00 00 4c 89 b5 40 ff ff ff 4d 8d bc 24 90 00 00 00 4c 89 ff e8 c1 97 f8 e0 <49> 83 bc 24 90 00 00 00 00 0f 84 0f 02 00 00 49 8d 7c 24 08 e8 a8
      [   53.454618] RSP: 0018:ffff88812247f430 EFLAGS: 00010286
      [   53.454625] RAX: 0000000000000000 RBX: ffff888136440000 RCX: ffffffffa03fb78f
      [   53.454633] RDX: 0000000000000000 RSI: 0000000000000008 RDI: dead000000000160
      [   53.454641] RBP: ffff88812247f500 R08: ffffffff8113589f R09: 0000000000000000
      [   53.454648] R10: ffffffff83063843 R11: fffffbfff060c708 R12: dead0000000000d0
      [   53.454656] R13: ffff888136449ba0 R14: 0000000000002000 R15: dead000000000160
      [   53.454664] FS:  00007fde095c4880(0000) GS:ffff88840c880000(0000) knlGS:0000000000000000
      [   53.454672] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   53.454679] CR2: 00007fef132b4f28 CR3: 000000012245c002 CR4: 00000000003706e0
      [   53.454686] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   53.454693] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   53.454700] Call Trace:
      [   53.454833]  ? i915_ggtt_suspend+0x1f0/0x1f0 [i915]
      Reported-by: NMatthew Auld <matthew.auld@intel.com>
      Fixes: afeda4f3 ("drm/i915/dsb: Pre allocate and late cleanup of cmd buffer")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Tested-by: NMatthew Auld <matthew.auld@intel.com>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201125193032.29282-1-chris@chris-wilson.co.uk
      (cherry picked from commit b3bf99da)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      ccc9e67a
    • J
      drm/i915/display: return earlier from intel_modeset_init() without display · 37eade64
      Jani Nikula 提交于
      !HAS_DISPLAY() implies !HAS_OVERLAY(), skipping overlay setup anyway, so
      return earlier from intel_modeset_init() for clarity.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-4-lucas.demarchi@intel.com
      (cherry picked from commit 71c8415d)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      37eade64
    • C
      drm/i915/gt: Limit frequency drop to RPe on parking · aff76ab7
      Chris Wilson 提交于
      We treat idling the GT (intel_rps_park) as a downclock event, and reduce
      the frequency we intend to restart the GT with. Since the two workloads
      are likely related (e.g. a compositor rendering every 16ms), we want to
      carry the frequency and load information from across the idling.
      However, we do also need to update the frequencies so that workloads
      that run for less than 1ms are autotuned by RPS (otherwise we leave
      compositors running at max clocks, draining excess power). Conversely,
      if we try to run too slowly, the next workload has to run longer. Since
      there is a hysteresis in the power graph, below a certain frequency
      running a short workload for longer consumes more energy than running it
      slightly higher for less time. The exact balance point is unknown
      beforehand, but measurements with 30fps media playback indicate that RPe
      is a better choice.
      Reported-by: NEdward Baker <edward.baker@intel.com>
      Tested-by: NEdward Baker <edward.baker@intel.com>
      Fixes: 043cd2d1 ("drm/i915/gt: Leave rps->cur_freq on unpark")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Edward Baker <edward.baker@intel.com>
      Cc: Andi Shyti <andi.shyti@intel.com>
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: <stable@vger.kernel.org> # v5.8+
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NAndi Shyti <andi.shyti@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201124183521.28623-1-chris@chris-wilson.co.uk
      (cherry picked from commit f7ed83cc)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      aff76ab7
    • V
      drm/i915/gt: Retain default context state across shrinking · 78b2eb8a
      Venkata Ramana Nayana 提交于
      As we use a shmemfs file to hold the context state, when not in use it
      may be swapped out, such as across suspend. Since we wrote into the
      shmemfs without marking the pages as dirty, the contents may be dropped
      instead of being written back to swap. On re-using the shmemfs file,
      such as creating a new context after resume, the contents of that file
      were likely garbage and so the new context could then hang the GPU.
      
      Simply mark the page as being written when copying into the shmemfs
      file, and it the new contents will be retained across swapout.
      
      Fixes: be1cb55a ("drm/i915/gt: Keep a no-frills swappable copy of the default context state")
      Cc: Sudeep Dutt <sudeep.dutt@intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Ramalingam C <ramalingam.c@intel.com>
      Signed-off-by: NCQ Tang <cq.tang@intel.com>
      Signed-off-by: NVenkata Ramana Nayana <venkata.ramana.nayana@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: <stable@vger.kernel.org> # v5.8+
      Link: https://patchwork.freedesktop.org/patch/msgid/20201127120718.454037-161-matthew.auld@intel.com
      (cherry picked from commit a9d71f76)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      78b2eb8a