linux/drivers/gpu/drm/i915
Jani Nikula 789e46fbfc
drm/i915/panic: fix panic structure allocation memory leak
Separating the panic allocation from framebuffer allocation in commit
729c5f7ffa ("drm/{i915,xe}/panic: move framebuffer allocation where it
belongs") failed to deallocate the panic structure anywhere.

The fix is two-fold. First, free the panic structure in
intel_user_framebuffer_destroy() in the general case. Second, move the
panic allocation later to intel_framebuffer_init() to not leak the panic
structure in error paths (if any, now or later) between
intel_framebuffer_alloc() and intel_framebuffer_init().

v2: Rebase

Fixes: 729c5f7ffa ("drm/{i915,xe}/panic: move framebuffer allocation where it belongs")
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: Maarten Lankhorst <dev@lankhorst.se>
Reported-by: Michał Grzelak <michal.grzelak@intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Michał Grzelak <michal.grzelak@intel.com> # v1
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20251015095135.2183415-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit 8f8ef09fcf6a3b00369bfc704e8f68d7474eca94)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-10-20 12:53:57 -04:00
..
display drm/i915/panic: fix panic structure allocation memory leak 2025-10-20 12:53:57 -04:00
gem drm/i915/frontbuffer: Move bo refcounting intel_frontbuffer_{get,release}() 2025-10-13 14:08:41 -04:00
gt drm/i915/guc: Skip communication warning on reset in progress 2025-10-13 14:08:41 -04:00
gvt drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
pxp drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
selftests drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
soc drm/i915/display: add intel_display_device_present() 2025-09-09 09:32:01 +03:00
.gitignore
i915_active.c drm/i915/active: Use try_cmpxchg64() in __active_lookup() 2025-08-15 09:17:11 +01:00
i915_active.h drm/i915: Remove deadcode 2024-12-30 01:31:31 +01:00
i915_active_types.h
i915_cmd_parser.c
i915_cmd_parser.h
i915_config.c
i915_config.h
i915_debugfs.c drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
i915_debugfs.h
i915_debugfs_params.c drm/i915: use drm->debugfs_root for creating debugfs files 2025-08-07 11:30:26 +03:00
i915_debugfs_params.h
i915_deps.c
i915_deps.h
i915_driver.c drm/i915: Drop unused struct_mutex from drm_i915_private 2025-09-09 10:39:35 -04:00
i915_driver.h drm/i915/error: drop dmesg suggestion to file bugs on GPU hangs 2025-05-02 12:33:38 +03:00
i915_drm_client.c drm: make drm-active- stats optional 2024-12-19 16:56:17 +01:00
i915_drm_client.h
i915_drv.h Cross-subsystem Changes: 2025-09-12 12:17:10 +10:00
i915_file_private.h
i915_gem.c drm/i915: Clean-up outdated struct_mutex comments 2025-09-09 10:39:21 -04:00
i915_gem.h drm/i915: move GEM_QUIRK_PIN_SWIZZLED_PAGES to i915_gem.h 2025-06-27 08:15:32 +02:00
i915_gem_evict.c
i915_gem_evict.h
i915_gem_gtt.c
i915_gem_gtt.h
i915_gem_ww.c
i915_gem_ww.h
i915_getparam.c drm/{i915,xe}: convert i915 and xe display members into pointers 2025-05-16 11:15:16 +03:00
i915_getparam.h
i915_gpu_error.c Merge tag 'drm-intel-gt-next-2025-09-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-09-15 13:16:54 +10:00
i915_gpu_error.h drm/i915/guc: Include the GuC registers in the error state 2025-09-11 11:28:02 -07:00
i915_gtt_view_types.h drm/i915: split out i915_gtt_view_types.h from i915_vma_types.h 2025-03-03 13:44:53 +02:00
i915_hwmon.c
i915_hwmon.h
i915_ioc32.c
i915_ioc32.h
i915_ioctl.c
i915_ioctl.h
i915_iosf_mbi.h x86/platform/iosf_mbi: Remove unused iosf_mbi_unregister_pmic_bus_access_notifier() 2025-04-01 20:31:39 +02:00
i915_irq.c drm/i915: Remove struct_mutex in i915_irq.c 2025-09-09 10:34:25 -04:00
i915_irq.h drm/i915: Introduce i915_error_regs 2025-02-18 01:25:31 +02:00
i915_list_util.h drm/i915: split out i915_list_util.h 2025-09-12 11:08:45 +03:00
i915_memcpy.c
i915_memcpy.h
i915_mitigations.c
i915_mitigations.h
i915_mm.c drm/i915: track_pfn() -> "pfnmap tracking" 2025-05-22 14:55:37 -07:00
i915_mm.h
i915_module.c Merge tag 'drm-intel-gt-next-2025-02-26' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-03-13 07:54:41 +10:00
i915_params.c
i915_params.h
i915_pci.c drm/i915/pci: Remove force_probe requirement for DG1 2025-05-15 16:50:04 +02:00
i915_pci.h
i915_perf.c drm/i915: Avoid open-coded use of ratelimit_state structure's ->missed field 2025-05-08 16:13:26 -07:00
i915_perf.h
i915_perf_oa_regs.h
i915_perf_types.h
i915_pmu.c drm/i915: fix build error some more 2025-06-25 10:23:16 +03:00
i915_pmu.h Merge tag 'drm-intel-gt-next-2025-02-26' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-03-13 07:54:41 +10:00
i915_priolist_types.h
i915_ptr_util.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_pvinfo.h
i915_query.c
i915_query.h
i915_reg.h drm/i915: use REG_BIT on FW_BLC_SELF_* macros 2025-09-04 13:36:43 +03:00
i915_reg_defs.h drm/i915: Convert REG_GENMASK*() to fixed-width GENMASK_U*() 2025-04-29 15:58:38 -04:00
i915_request.c drm/i915: Protect access to driver and timeline name 2025-06-13 08:26:36 +01:00
i915_request.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_scatterlist.c
i915_scatterlist.h
i915_scheduler.c
i915_scheduler.h
i915_scheduler_types.h
i915_selftest.h
i915_sw_fence.c drm/i915: Protect access to driver and timeline name 2025-06-13 08:26:36 +01:00
i915_sw_fence.h
i915_sw_fence_work.c
i915_sw_fence_work.h
i915_switcheroo.c drm/i915/display: add intel_display_device_present() 2025-09-09 09:32:01 +03:00
i915_switcheroo.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
i915_sysfs.h
i915_tasklet.h
i915_timer_util.c drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_timer_util.h drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_trace.h
i915_trace_points.c
i915_ttm_buddy_manager.c
i915_ttm_buddy_manager.h
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
i915_utils.h drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
i915_vgpu.c
i915_vgpu.h
i915_vma.c drm/i915: reduce stack usage in igt_vma_pin1() 2025-06-24 17:23:02 -04:00
i915_vma.h drm/i915: split out i915_ptr_util.h 2025-09-12 11:08:45 +03:00
i915_vma_resource.c
i915_vma_resource.h
i915_vma_types.h drm/i915: split out i915_gtt_view_types.h from i915_vma_types.h 2025-03-03 13:44:53 +02:00
i915_wait_util.h drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
intel_clock_gating.c drm/i915/reg: separate VLV_DSPCLK_GATE_D from DSPCLK_GATE_D 2025-08-14 13:12:23 +03:00
intel_clock_gating.h
intel_cpu_info.c
intel_cpu_info.h
intel_device_info.c
intel_device_info.h
intel_gvt.c drm/i915: fix typos in drm/i915 files 2025-01-23 05:48:23 -05:00
intel_gvt.h
intel_gvt_mmio_table.c drm/i915/gvt: convert mmio table to struct intel_display 2025-08-14 13:12:23 +03:00
intel_mchbar_regs.h
intel_memory_region.c drm/i915: Expose intel_memory_type_str() 2025-04-02 02:15:32 +03:00
intel_memory_region.h drm/i915: Expose intel_memory_type_str() 2025-04-02 02:15:32 +03:00
intel_pci_config.h
intel_pcode.c drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
intel_pcode.h drm/i915/pcode: add struct drm_device based interface 2025-06-23 21:45:16 +03:00
intel_region_ttm.c
intel_region_ttm.h
intel_runtime_pm.c ref_tracker: eliminate the ref_tracker_dir name field 2025-06-19 17:02:04 -07:00
intel_runtime_pm.h drm/i915: fix typos in drm/i915 files 2025-01-23 05:48:23 -05:00
intel_step.c
intel_step.h
intel_uncore.c drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
intel_uncore.h drm/i915: add out_value to intel_wait_for_register_fw() and intel_de_wait_fw() 2025-06-04 16:28:35 +03:00
intel_uncore_trace.c
intel_uncore_trace.h
intel_wakeref.c ref_tracker: eliminate the ref_tracker_dir name field 2025-06-19 17:02:04 -07:00
intel_wakeref.h drm/i915: reduce intel_wakeref.h dependencies 2025-04-01 11:48:18 +03:00
Kconfig
Kconfig.debug drm/i915: Fix selecting CONFIG_DRM_KUNIT_TEST in debug builds 2025-07-25 11:41:55 +03:00
Kconfig.profile
Makefile drm/i915: split out i915_timer_util.[ch] 2025-09-12 11:08:45 +03:00
TODO.txt
vlv_iosf_sb.c drm/i915: drop intel_dpio_phy.h include from VLV IOSF SB 2025-05-30 15:45:01 +03:00
vlv_iosf_sb.h drm/i915: rename VLV IOSF SB ports parameter to unit_mask 2025-05-13 10:26:45 +03:00
vlv_iosf_sb_reg.h drm/i915: rename vlv_sideband*.[ch] to vlv_iosf_sb*.[ch] 2025-05-13 10:26:44 +03:00
vlv_suspend.c drm/i915: split out i915_wait_util.h 2025-09-12 11:08:45 +03:00
vlv_suspend.h