linux/drivers/gpu/drm/i915
Matthew Brost a63bcf08f0 drm/i915: Fix syncmap memory leak
A small race exists between intel_gt_retire_requests_timeout and
intel_timeline_exit which could result in the syncmap not getting
free'd. Rather than work to hard to seal this race, simply cleanup the
syncmap on fini.

unreferenced object 0xffff88813bc53b18 (size 96):
  comm "gem_close_race", pid 5410, jiffies 4294917818 (age 1105.600s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 00 00 00 00 0a 00 00 00  ................
    00 00 00 00 00 00 00 00 6b 6b 6b 6b 06 00 00 00  ........kkkk....
  backtrace:
    [<00000000120b863a>] __sync_alloc_leaf+0x1e/0x40 [i915]
    [<00000000042f6959>] __sync_set+0x1bb/0x240 [i915]
    [<0000000090f0e90f>] i915_request_await_dma_fence+0x1c7/0x400 [i915]
    [<0000000056a48219>] i915_request_await_object+0x222/0x360 [i915]
    [<00000000aaac4ee3>] i915_gem_do_execbuffer+0x1bd0/0x2250 [i915]
    [<000000003c9d830f>] i915_gem_execbuffer2_ioctl+0x405/0xce0 [i915]
    [<00000000fd7a8e68>] drm_ioctl_kernel+0xb0/0xf0 [drm]
    [<00000000e721ee87>] drm_ioctl+0x305/0x3c0 [drm]
    [<000000008b0d8986>] __x64_sys_ioctl+0x71/0xb0
    [<0000000076c362a4>] do_syscall_64+0x33/0x80
    [<00000000eb7a4831>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Fixes: 531958f6f3 ("drm/i915/gt: Track timeline activeness in enter/exit")
Cc: <stable@vger.kernel.org>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210730195342.110234-1-matthew.brost@intel.com
(cherry picked from commit faf890985e)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2021-08-26 07:31:52 -04:00
..
display drm/i915/dp: remove superfluous EXPORT_SYMBOL() 2021-08-18 07:23:57 -04:00
gem drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser" 2021-07-19 09:55:20 -04:00
gt drm/i915: Fix syncmap memory leak 2021-08-26 07:31:52 -04:00
gvt Merge tag 'gvt-fixes-2021-08-10' of https://github.com/intel/gvt-linux into drm-intel-fixes 2021-08-10 09:49:15 -04:00
selftests Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
.gitignore
dma_resv_utils.c dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
dma_resv_utils.h
i915_active_types.h drm/i915: drop the __i915_active_call pointer packing 2021-05-05 11:36:23 +01:00
i915_active.c drm/i915: Fix crash in auto_retire 2021-05-12 20:52:48 +03:00
i915_active.h drm/i915: drop the __i915_active_call pointer packing 2021-05-05 11:36:23 +01:00
i915_cmd_parser.c drm/i915: Correct the docs for intel_engine_cmd_parser 2021-07-21 11:49:36 -04:00
i915_config.c
i915_debugfs_params.c
i915_debugfs_params.h
i915_debugfs.c Cross-subsystem Changes: 2021-06-10 13:45:11 +10:00
i915_debugfs.h
i915_drv.c drm/i915: Drop all references to DRM IRQ midlayer 2021-07-06 15:10:58 -04:00
i915_drv.h drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser" 2021-07-19 09:55:20 -04:00
i915_fixed.h
i915_gem_evict.c
i915_gem_gtt.c
i915_gem_gtt.h
i915_gem.c Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
i915_gem.h
i915_getparam.c
i915_globals.c drm/i915: fix i915_globals_exit() section mismatch error 2021-08-05 07:07:57 +10:00
i915_globals.h drm/i915/ttm Initialize the ttm device and memory managers 2021-06-02 13:21:24 +01:00
i915_gpu_error.c drm/i915: Only access SFC_DONE when media domain is not fused off 2021-08-12 06:04:38 -04:00
i915_gpu_error.h Merge drm/drm-next into drm-misc-next 2021-05-22 07:17:05 +02:00
i915_ioc32.c
i915_ioc32.h
i915_irq.c drm/i915: Tweaked Wa_14010685332 for all PCHs 2021-08-18 07:23:50 -04:00
i915_irq.h drm/i915: Use the correct IRQ during resume 2021-07-06 15:10:58 -04:00
i915_memcpy.c
i915_memcpy.h
i915_mitigations.c
i915_mitigations.h
i915_mm.c Revert "i915: use io_mapping_map_user" 2021-06-02 15:06:10 +03:00
i915_params.c drm/i915/uc: Use platform specific defaults for GuC/HuC enabling 2021-06-09 10:52:03 -07:00
i915_params.h drm/i915/uc: Use platform specific defaults for GuC/HuC enabling 2021-06-09 10:52:03 -07:00
i915_pci.c drm/i915: Call i915_globals_exit() if pci_register_device() fails 2021-08-03 07:13:53 -04:00
i915_perf_types.h
i915_perf.c Cross-subsystem Changes: 2021-06-10 13:45:11 +10:00
i915_perf.h
i915_pmu.c Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
i915_pmu.h
i915_priolist_types.h
i915_pvinfo.h
i915_query.c drm/i915/gem: hide new uAPI behind CONFIG_BROKEN 2021-05-04 10:58:56 +01:00
i915_query.h
i915_reg.h drm/i915/display: Fix the 12 BPC bits for PIPE_MISC reg 2021-08-12 05:54:44 -04:00
i915_request.c Revert "drm/i915: Propagate errors on awaiting already signaled fences" 2021-07-19 09:55:24 -04:00
i915_request.h
i915_scatterlist.c drm/i915/ttm Initialize the ttm device and memory managers 2021-06-02 13:21:24 +01:00
i915_scatterlist.h drm/i915/ttm Initialize the ttm device and memory managers 2021-06-02 13:21:24 +01:00
i915_scheduler_types.h
i915_scheduler.c
i915_scheduler.h
i915_selftest.h
i915_suspend.c drm/i915: replace IS_GEN and friends with GRAPHICS_VER 2021-06-07 00:59:48 -07:00
i915_suspend.h
i915_sw_fence_work.c
i915_sw_fence_work.h
i915_sw_fence.c dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
i915_sw_fence.h
i915_switcheroo.c
i915_switcheroo.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
i915_sysfs.h
i915_trace_points.c
i915_trace.h drm/i915: Add frontbuffer tracking tracepoints 2021-04-28 15:55:21 +03:00
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c
i915_utils.h drm/i915: Promote ptrdiff() to i915_utils.h 2021-06-03 23:35:43 +02:00
i915_vgpu.c drm/i915: replace IS_GEN and friends with GRAPHICS_VER 2021-06-07 00:59:48 -07:00
i915_vgpu.h
i915_vma_types.h drm/i915: Remove stray newlines 2021-04-28 15:55:09 +03:00
i915_vma.c Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
i915_vma.h Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
intel_device_info.c drm/i915: fix not reading DSC disable fuse in GLK 2021-07-26 06:16:43 -04:00
intel_device_info.h drm/i915/adl_p: CDCLK crawl support for ADL 2021-06-09 17:08:26 +03:00
intel_dram.c drm/i915: replace IS_GEN and friends with GRAPHICS_VER 2021-06-07 00:59:48 -07:00
intel_dram.h
intel_gvt.c
intel_gvt.h
intel_memory_region.c Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
intel_memory_region.h Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
intel_pch.c drm/i915: replace IS_GEN and friends with GRAPHICS_VER 2021-06-07 00:59:48 -07:00
intel_pch.h drm/i915/adl_p: Add PCH support 2021-05-12 16:56:56 -07:00
intel_pm.c drm/i915/adl_p: Same slices mask is not same Dbuf state 2021-06-09 17:24:58 +03:00
intel_pm.h drm/i915: Remove the repeated declaration 2021-05-26 16:20:38 +03:00
intel_region_ttm.c Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
intel_region_ttm.h Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
intel_runtime_pm.c
intel_runtime_pm.h drm/i915: Remove reference to struct drm_device.pdev 2021-04-29 21:19:10 +02:00
intel_sideband.c drm/i915: replace IS_GEN and friends with GRAPHICS_VER 2021-06-07 00:59:48 -07:00
intel_sideband.h
intel_step.c drm/i915/adl_p: Add IPs stepping mapping 2021-05-14 19:48:38 -07:00
intel_step.h
intel_uncore.c Cross-subsystem Changes: 2021-06-10 13:45:11 +10:00
intel_uncore.h
intel_wakeref.c
intel_wakeref.h
intel_wopcm.c drm/i915: replace IS_GEN and friends with GRAPHICS_VER 2021-06-07 00:59:48 -07:00
intel_wopcm.h
Kconfig VFIO update for v5.14-rc1 2021-07-03 11:49:33 -07:00
Kconfig.debug
Kconfig.profile
Kconfig.unstable
Makefile Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
TODO.txt
vlv_suspend.c
vlv_suspend.h