linux/drivers/gpu/drm/i915
Andrzej Hajda 0561794b6b drm/i915: do not clean GT table on error path
The only task of intel_gt_release_all is to zero gt table. Calling
it on error path prevents intel_gt_driver_late_release_all (called from
i915_driver_late_release) to cleanup GTs, causing leakage.
After i915_driver_late_release GT array is not used anymore so
it does not need cleaning at all.

Sample leak report:

BUG i915_request (...): Objects remaining in i915_request on __kmem_cache_shutdown()
...
Object 0xffff888113420040 @offset=64
Allocated in __i915_request_create+0x75/0x610 [i915] age=18339 cpu=1 pid=1454
 kmem_cache_alloc+0x25b/0x270
 __i915_request_create+0x75/0x610 [i915]
 i915_request_create+0x109/0x290 [i915]
 __engines_record_defaults+0xca/0x440 [i915]
 intel_gt_init+0x275/0x430 [i915]
 i915_gem_init+0x135/0x2c0 [i915]
 i915_driver_probe+0x8d1/0xdc0 [i915]

v2: removed whole intel_gt_release_all

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8489
Fixes: bec68cc9ea ("drm/i915: Prepare for multiple GTs")
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231115-dont_clean_gt_on_error_path-v2-1-54250125470a@intel.com
(cherry picked from commit e899505533)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2023-11-20 11:06:53 +02:00
..
display drm/i915/dp_mst: Fix race between connector registration and setup 2023-11-20 11:06:34 +02:00
gem drm fixes for 6.7-rc1 2023-11-10 14:59:30 -08:00
gt drm/i915: do not clean GT table on error path 2023-11-20 11:06:53 +02:00
gvt VFIO updates for v6.7 2023-11-01 13:55:40 -10:00
pxp Char/Misc and other driver changes for 6.7-rc1 2023-11-03 14:51:08 -10:00
selftests Merge tag 'drm-intel-next-2023-10-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-10-16 16:44:45 +10:00
soc drm/i915/display: Created exclusive version of vga decode setup 2023-10-05 12:37:08 +05:30
.gitignore
i915_active_types.h drm/i915/active: remove useless i915_utils.h include 2021-12-13 12:04:44 +02:00
i915_active.c drm/i915: Fix premature release of request's reusable memory 2023-08-01 10:56:34 +01:00
i915_active.h drm/i915/active: fix kernel-doc for function parameters 2023-05-04 12:11:56 +03:00
i915_cmd_parser.c drm/i915: Wrap all access to i915_vma.node.start|size 2022-12-06 10:52:42 +01:00
i915_cmd_parser.h drm/i915: split out i915_cmd_parser.h from i915_drv.h 2022-01-10 15:43:09 +02:00
i915_config.c drm/i915: add i915_config.h and move relevant declarations there 2023-01-20 10:13:50 +02:00
i915_config.h drm/i915: add i915_config.h and move relevant declarations there 2023-01-20 10:13:50 +02:00
i915_debugfs_params.c drm/i915/mtl: Apply notify_guc to all GTs 2023-11-06 14:42:44 +02:00
i915_debugfs_params.h
i915_debugfs.c drm/i915: Run relevant bits of debugfs drop_caches per GT 2023-09-09 00:05:42 +02:00
i915_debugfs.h
i915_deps.c drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
i915_deps.h drm/i915: Break out the i915_deps utility 2021-12-22 08:52:57 +01:00
i915_driver.c drm/i915: do not clean GT table on error path 2023-11-20 11:06:53 +02:00
i915_driver.h drm/i915: Update DRIVER_DATE to 20230929 2023-09-29 12:43:23 +03:00
i915_drm_client.c drm/i915: Use the fdinfo helper 2023-06-06 10:01:06 +01:00
i915_drm_client.h drm/i915: make i915_drm_client_fdinfo() reference conditional again 2023-06-20 08:54:43 +01:00
i915_drv.h Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
i915_file_private.h drm/i915: Use i915 instead of dev_priv insied the file_priv structure 2023-03-23 01:53:44 +01:00
i915_fixed.h
i915_gem_evict.c drm/i915: improve the catch-all evict to handle lock contention 2022-12-30 03:04:39 -05:00
i915_gem_evict.h drm/i915: improve the catch-all evict to handle lock contention 2022-12-30 03:04:39 -05:00
i915_gem_gtt.c treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
i915_gem_gtt.h Merge drm/drm-next into drm-intel-next 2023-01-25 11:41:16 +02:00
i915_gem_ww.c drm/i915: Break out dma_resv ww locking utilities to separate files 2021-06-17 14:22:59 +01:00
i915_gem_ww.h drm/i915: Ditch the i915_gem_ww_ctx loop member 2021-08-20 09:39:41 +01:00
i915_gem.c Merge tag 'drm-intel-gt-next-2023-10-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-10-17 13:46:21 +10:00
i915_gem.h drm/i915: move I915_GEM_GPU_DOMAINS to i915_gem.h 2023-01-20 10:14:31 +02:00
i915_getparam.c drm/i915/pxp: Optimize GET_PARAM:PXP_STATUS 2023-08-15 13:28:18 -07:00
i915_getparam.h drm/i915: split out i915_getparam.h from i915_drv.h 2022-01-10 15:43:05 +02:00
i915_gpu_error.c Merge tag 'drm-intel-gt-next-2023-10-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-10-17 13:46:21 +10:00
i915_gpu_error.h drm/i915: separate display info printing from the rest 2023-06-29 16:28:14 +03:00
i915_hwmon.c Merge drm/drm-next into drm-intel-next 2023-05-31 12:01:51 +03:00
i915_hwmon.h drm/i915/guc: Disable PL1 power limit when loading GuC firmware 2023-04-26 18:02:40 -04:00
i915_ioc32.c drm/i915: split out i915_getparam.h from i915_drv.h 2022-01-10 15:43:05 +02:00
i915_ioc32.h
i915_ioctl.c drm/i915: split out i915_reg_read_ioctl() to i915_ioctl.[ch] 2022-01-21 09:59:22 +02:00
i915_ioctl.h drm/i915: split out i915_reg_read_ioctl() to i915_ioctl.[ch] 2022-01-21 09:59:22 +02:00
i915_iosf_mbi.h drm/i915: abstraction for iosf to compile on all archs 2021-10-27 00:32:01 -07:00
i915_irq.c drm/i915/irq: Clear GFX_MSTR_IRQ as part of IRQ reset 2023-09-25 09:04:32 -07:00
i915_irq.h drm/i915/irq: split out display irq handling 2023-05-16 10:31:27 +03:00
i915_memcpy.c
i915_memcpy.h
i915_mitigations.c drm/i915: move the DRIVER_* macros to i915_driver.[ch] 2022-02-10 11:44:25 +02:00
i915_mitigations.h
i915_mm.c drm/i915: Skip remap_io_mapping() for non-x86 platforms 2021-12-08 13:26:14 -08:00
i915_mm.h drm/i915: Fix header test for !CONFIG_X86 2022-02-07 12:56:49 +00:00
i915_module.c Merge tag 'drm-intel-gt-next-2022-02-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next 2022-02-23 15:03:51 -05:00
i915_params.c drm/i915: Remove the module parameter 'fastboot' 2023-10-12 12:45:23 +05:30
i915_params.h drm/i915: Remove the module parameter 'fastboot' 2023-10-12 12:45:23 +05:30
i915_pci.c Merge tag 'drm-intel-gt-next-2023-10-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-10-20 16:15:25 +10:00
i915_pci.h drm/i915: Sanitycheck PCI BARs 2022-08-10 13:11:17 +03:00
i915_perf_oa_regs.h drm/i915/mtl: Implement Wa_14019141245 2023-04-26 15:56:46 -07:00
i915_perf_types.h drm/i915/dg2: Drop Wa_16011777198 2023-08-17 15:21:59 -07:00
i915_perf.c drm fixes for 6.7-rc1 2023-11-10 14:59:30 -08:00
i915_perf.h drm/i915/perf: Pass i915 object to perf revision helper 2023-03-24 08:50:16 -07:00
i915_pmu.c drm for 6.7-rc1 2023-11-01 06:28:35 -10:00
i915_pmu.h drm/i915: rename I915_PMU_MAX_GTS to I915_PMU_MAX_GT 2023-06-06 09:23:47 -07:00
i915_priolist_types.h
i915_pvinfo.h
i915_query.c drm/i915: Partial abandonment of legacy DRM logging macros 2022-11-10 12:35:46 +00:00
i915_query.h
i915_reg_defs.h drm/i915: Add 16bit register/mask operators 2023-05-19 10:02:34 -07:00
i915_reg.h drm/i915/xe2lpd: display capability register definitions 2023-10-11 13:54:34 +03:00
i915_request.c drm/i915: mark requests for GuC virtual engines to avoid use-after-free 2023-08-30 11:32:48 -04:00
i915_request.h drm/i915/request: drop kernel-doc 2023-05-04 12:11:29 +03:00
i915_scatterlist.c Merge tag 'drm-intel-gt-next-2023-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-04-06 14:21:00 +02:00
i915_scatterlist.h drm/i915: Implement for_each_sgt_daddr_next 2023-09-30 13:49:22 +02:00
i915_scheduler_types.h drm/i915/guc: Implement GuC priority management 2021-07-27 17:32:27 -07:00
i915_scheduler.c drm/i915: move scheduler slabs to direct module init/exit 2021-07-28 17:18:56 +02:00
i915_scheduler.h drm/i915/tasklet: separate local hacks around struct tasklet_struct 2022-06-07 21:47:19 +03:00
i915_selftest.h drm/i915/guc: Delay disabling guc_id scheduling for better hysteresis 2022-10-26 17:29:43 -07:00
i915_suspend.c drm/i915/fbc: Remove intel_fbc_global_disable() 2022-04-13 17:19:04 +03:00
i915_suspend.h
i915_sw_fence_work.c drm/i915: Drop stealing of bits from i915_sw_fence function pointer 2021-11-30 17:52:15 -08:00
i915_sw_fence_work.h drm/i915: Drop error handling from dma_fence_work 2021-07-16 21:47:39 +02:00
i915_sw_fence.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
i915_sw_fence.h drm/i915: Remove unused function parameter 2022-09-24 00:59:13 -04:00
i915_switcheroo.c drm/i915: Allow switching away via vga-switcheroo if uninitialized 2023-01-18 17:12:23 +01:00
i915_switcheroo.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c drm/i915: remove unnecessary intel_pm.h includes 2023-03-06 18:26:30 +02:00
i915_sysfs.h drm/i915/gt: create per-tile sysfs interface 2022-03-21 08:37:39 +00:00
i915_tasklet.h drm/i915/tasklet: separate local hacks around struct tasklet_struct 2022-06-07 21:47:19 +03:00
i915_trace_points.c
i915_trace.h drm/i915: use direct alias for i915 in requests 2023-07-24 17:24:35 +02:00
i915_ttm_buddy_manager.c drm/i915: Move the size computations to drm buddy 2023-09-11 20:18:13 +02:00
i915_ttm_buddy_manager.h drm/i915/uapi: expose the avail tracking 2022-07-01 08:29:59 +01:00
i915_user_extensions.c overflow: Introduce overflows_type() and castable_to_type() 2022-11-02 12:39:27 -07:00
i915_user_extensions.h
i915_utils.c drm/i915: Move intel_vtd_active and run_as_guest to i915_utils 2022-03-30 12:04:01 +01:00
i915_utils.h drm/i915/utils: drop kernel-doc from __wait_for() 2023-05-04 12:11:21 +03:00
i915_vgpu.c drm/i915: Add object locking to i915_gem_evict_for_node and i915_gem_evict_something, v2. 2022-01-18 12:18:03 +01:00
i915_vgpu.h
i915_vma_resource.c drm/i915/vma: constify unbind_fence_ops 2023-08-25 09:02:55 +03:00
i915_vma_resource.h drm/i915/vma: fix struct i915_vma_bindinfo kernel-doc 2023-05-05 11:28:09 +03:00
i915_vma_types.h drm/i915: use pat_index instead of cache_level 2023-05-11 17:38:55 +02:00
i915_vma.c Merge drm/drm-next into drm-intel-next 2023-09-15 11:23:38 +03:00
i915_vma.h drm/i915/fbc: Moved fence related code away from intel_fbc 2023-08-07 08:28:28 +03:00
intel_clock_gating.c Merge drm/drm-next into drm-intel-next 2023-10-04 18:06:27 +03:00
intel_clock_gating.h drm/i915: rename intel_pm.[ch] to intel_clock_gating.[ch] 2023-04-05 19:54:13 +03:00
intel_device_info.c Merge drm/drm-next into drm-intel-next 2023-10-04 18:06:27 +03:00
intel_device_info.h Merge tag 'drm-intel-gt-next-2023-10-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2023-10-20 16:15:25 +10:00
intel_gvt_mmio_table.c drm/i915/gvt: don't include gvt.h from intel_gvt_mmio_table.h 2023-10-11 14:19:04 +03:00
intel_gvt.c drm/i915/gvt: Fix the compiling error when CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n 2022-04-28 17:01:17 -04:00
intel_gvt.h drm/i915/gvt: move the gvt code into kvmgt.ko 2022-04-21 07:36:56 -04:00
intel_mchbar_regs.h drm/i915/hwmon: Display clamped PL1 limit 2023-01-06 15:53:59 +05:30
intel_memory_region.c drm/i915: drop cast from DEFINE_RES_MEM() usage 2023-01-18 11:45:23 +02:00
intel_memory_region.h drm/i915: remove intel_memory_region avail 2022-07-01 08:29:59 +01:00
intel_pci_config.h drm/i915: Name our BARs based on the spec 2022-10-20 21:08:42 +03:00
intel_pcode.c drm/i915/pcode: Give the punit time to settle before fatally failing 2023-02-07 18:29:43 +01:00
intel_pcode.h drm/i915/pcode: Add a couple of pcode helpers 2022-05-20 09:11:45 +01:00
intel_region_ttm.c drm/i915/intel_region_ttm: Provide missing description for 'offset' param 2023-04-03 17:48:39 +03:00
intel_region_ttm.h drm/i915/ttm: fix 32b build 2022-07-17 14:53:47 -04:00
intel_runtime_pm.c drm/i915: Remove runtime suspended boolean from intel_runtime_pm struct 2023-09-18 08:42:58 +03:00
intel_runtime_pm.h drm/i915: Remove runtime suspended boolean from intel_runtime_pm struct 2023-09-18 08:42:58 +03:00
intel_sbi.c drm/i915: Only include i915_reg.h from .c files 2022-02-02 07:59:54 -08:00
intel_sbi.h drm/i915: rename intel_sideband.[ch] to intel_sbi.[ch] 2021-10-14 18:05:04 +03:00
intel_step.c drm/i915: Add wrapper for getting display step 2023-10-11 15:19:48 +05:30
intel_step.h drm/i915: Add wrapper for getting display step 2023-10-11 15:19:48 +05:30
intel_uncore.c drm/i915/uncore: fix race around i915->params.mmio_debug 2023-08-01 19:39:17 +03:00
intel_uncore.h drm/i915/uncore: add intel_uncore_regs() helper 2023-07-04 17:12:48 +03:00
intel_wakeref.c drm/i915: Lift runtime-pm acquire callbacks out of intel_wakeref.mutex 2023-09-30 13:49:14 +02:00
intel_wakeref.h drm/i915: use pointer to i915 instead of rpm in wakeref 2023-06-10 06:32:58 +03:00
Kconfig fbdev: Use _IOMEM_ infix for I/O-memory helpers 2023-07-31 20:06:52 +02:00
Kconfig.debug drm/i915/guc: Track all sent actions to GuC 2023-05-30 15:18:21 -07:00
Kconfig.profile drm/i915: Improve long running compute w/a for GuC submission 2022-10-24 12:12:47 -07:00
Makefile drm/i915/hdcp: Move common message filling function to its own file 2023-10-12 09:31:32 +05:30
TODO.txt drm/i915/tasklet: separate local hacks around struct tasklet_struct 2022-06-07 21:47:19 +03:00
vlv_sideband_reg.h drm/i915: split out vlv sideband registers from i915_reg.h 2022-01-10 16:17:50 +02:00
vlv_sideband.c drm/i915/display: add intel_display_limits.h for key enums 2023-01-25 13:59:12 +02:00
vlv_sideband.h drm/i915: split out vlv sideband registers from i915_reg.h 2022-01-10 16:17:50 +02:00
vlv_suspend.c drm/i915: rename intel_pm.[ch] to intel_clock_gating.[ch] 2023-04-05 19:54:13 +03:00
vlv_suspend.h