linux/drivers/gpu/drm/i915
Paulo Zanoni d9255d5714 drm/i915: destroy connector sysfs files earlier
For some reason, every single time I try to run module_reload
something tries to read the connector sysfs files. This happens
after we destroy the encoders and before we destroy the connectors, so
when the sysfs read triggers the connector detect() function,
intel_conector->encoder points to memory that was already freed.

The bad backtrace is just:
    [<ffffffff8163ca9a>] dump_stack+0x54/0x74
    [<ffffffffa00c2c8e>] intel_dp_detect+0x1e/0x4b0 [i915]
    [<ffffffffa001913d>] status_show+0x3d/0x80 [drm]
    [<ffffffff813d5340>] dev_attr_show+0x20/0x60
    [<ffffffff81221f50>] ? sysfs_read_file+0x80/0x1b0
    [<ffffffff81221f79>] sysfs_read_file+0xa9/0x1b0
    [<ffffffff811aaf1e>] vfs_read+0x9e/0x170
    [<ffffffff811aba4c>] SyS_read+0x4c/0xa0
    [<ffffffff8164e392>] system_call_fastpath+0x16/0x1b

But if you add tons of memory checking debug options to your Kernel
you'll also see:
 - general protection fault: 0000
 - BUG kmalloc-4096 (Tainted: G      D W   ): Poison overwritten
 - INFO: Allocated in intel_ddi_init+0x65/0x270 [i915]
 - INFO: Freed in intel_dp_encoder_destroy+0x69/0xb0 [i915]
Among a bunch of other error messages.

So this commit just destroys the sysfs files before both the encoder
and connectors are freed.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-01 07:45:48 +02:00
..
dvo_ch7xxx.c drm/i915: dvo_ch7xxx: fix vsync polarity setting 2013-07-25 16:10:22 +02:00
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c
dvo_sil164.c
dvo_tfp410.c
dvo.h drm/i915: Remove unused mode_fixup() vfunc of struct intel_dvo_dev_ops 2013-09-05 21:39:59 +02:00
i915_debugfs.c drm/i915: Calculate PSR register offsets from base + gen 2013-10-01 07:45:12 +02:00
i915_dma.c drm/i915: Delay the release of the forcewake by a jiffie 2013-10-01 07:45:13 +02:00
i915_drv.c drm/i915: Call intel_uncore_early_sanitize() during resume 2013-10-01 07:45:10 +02:00
i915_drv.h drm/i915: Show WT caching in debugfs 2013-10-01 07:45:23 +02:00
i915_gem_context.c drm/i915: Convert active API to VMA 2013-10-01 07:45:21 +02:00
i915_gem_debug.c drm/i915: Fix #endif comment 2013-08-09 10:45:52 +02:00
i915_gem_dmabuf.c drm/i915: Pin pages whilst mapping the dma-buf 2013-09-03 19:17:58 +02:00
i915_gem_evict.c drm/i915: trace vm eviction instead of everything 2013-10-01 07:45:20 +02:00
i915_gem_execbuffer.c drm/i915: Convert active API to VMA 2013-10-01 07:45:21 +02:00
i915_gem_gtt.c drm/i915: Use kcalloc more 2013-10-01 07:45:01 +02:00
i915_gem_stolen.c Linux 3.12-rc2 2013-09-24 09:32:53 +02:00
i915_gem_tiling.c drm/i915: Use kcalloc more 2013-10-01 07:45:01 +02:00
i915_gem.c drm/i915: Add a tracepoint for using a semaphore 2013-10-01 07:45:24 +02:00
i915_gpu_error.c drm/i915: Show WT caching in debugfs 2013-10-01 07:45:23 +02:00
i915_ioc32.c
i915_irq.c drm/i915: Move the conditional seqno query into the tracepoint 2013-10-01 07:45:22 +02:00
i915_reg.h drm/i915/vlv: use correct units for rc6 residency v2 2013-10-01 07:45:44 +02:00
i915_suspend.c drm/i915: don't save/restore LBB on Gen5+ 2013-09-13 11:40:45 +02:00
i915_sysfs.c drm/i915/vlv: use correct units for rc6 residency v2 2013-10-01 07:45:44 +02:00
i915_trace_points.c
i915_trace.h drm/i915: Add a tracepoint for using a semaphore 2013-10-01 07:45:24 +02:00
i915_ums.c drm/i915: scrap register address storage 2013-06-10 19:54:14 +02:00
intel_acpi.c i915: fix ACPI _DSM warning 2013-08-05 19:04:05 +02:00
intel_bios.c drm/i915: Rip out SUPPORTS_EDP 2013-10-01 07:45:07 +02:00
intel_bios.h drm/i915: use the HDMI DDI buffer translations from VBT 2013-10-01 07:45:04 +02:00
intel_crt.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_ddi.c drm/i915: Add HSW CRT output readout support 2013-10-01 07:45:15 +02:00
intel_display.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_dp.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_drv.h drm/i915: Use crtc_clock with the adjusted mode 2013-10-01 07:45:38 +02:00
intel_dsi_cmd.c drm/i915/dsi: s/size_t/int/ 2013-09-04 17:34:51 +02:00
intel_dsi_cmd.h drm/i915/dsi: s/size_t/int/ 2013-09-04 17:34:51 +02:00
intel_dsi_pll.c drm/i915: Use adjusted_mode in DSI PLL calculations 2013-09-16 23:36:38 +02:00
intel_dsi.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_dsi.h drm/i915: add VLV DSI PLL Calculations 2013-09-04 17:34:48 +02:00
intel_dvo.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_fb.c drm/i915: make intel_crtc_fb_gamma_{set, get} static 2013-10-01 07:45:18 +02:00
intel_hdmi.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_i2c.c drm/i915: Program GMBUS Frequency based on the CDCLK for VLV. 2013-10-01 07:45:41 +02:00
intel_lvds.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_modes.c drm/i915: Add "Automatic" mode for the "Broadcast RGB" property 2013-01-20 13:09:44 +01:00
intel_opregion.c Linux 3.12-rc2 2013-09-24 09:32:53 +02:00
intel_overlay.c drm/i915: use pointer = k[cmz...]alloc(sizeof(*pointer), ...) pattern 2013-10-01 07:45:01 +02:00
intel_panel.c drm/i915/vlv: hack to init backlight regs if BIOS fails to do so v2 2013-10-01 07:45:41 +02:00
intel_pm.c drm/i915/vlv: reduce GT FIFO error info to a debug message 2013-10-01 07:45:46 +02:00
intel_ringbuffer.c drm/i915: s/HAS_L3_GPU_CACHE/HAS_L3_DPF 2013-09-19 20:41:00 +02:00
intel_ringbuffer.h drm/i915: Write RING_TAIL once per-request 2013-09-10 15:35:58 +02:00
intel_sdvo_regs.h
intel_sdvo.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_sideband.c drm/i915: Add additional pipe parameter for vlv_dpio_read and vlv_dpio_write. v2 2013-09-05 15:04:36 +02:00
intel_sprite.c drm/i915: use pointer = k[cmz...]alloc(sizeof(*pointer), ...) pattern 2013-10-01 07:45:01 +02:00
intel_tv.c drm/i915: destroy connector sysfs files earlier 2013-10-01 07:45:48 +02:00
intel_uncore.c drm/i915: Delay the release of the forcewake by a jiffie 2013-10-01 07:45:13 +02:00
Makefile drm/i915: add VLV DSI PLL Calculations 2013-09-04 17:34:48 +02:00