Commit def8509
committed
drm/i915/display: Fix NULL-crtc deref in calc_min_cdclk()
[ 23.419442] BUG: KASAN: null-ptr-deref in intel_plane_calc_min_cdclk+0x82/0x440 [i915]
[ 23.419527] Read of size 4 at addr 00000000000000f8 by task insmod/735
[ 23.419578]
[ 23.419644] CPU: 2 PID: 735 Comm: insmod Not tainted 5.5.0+ #114
[ 23.419716] Hardware name: ��������������������������������� ���������������������������������/���������������������������������, BIOS RYBDWi35.86A.0246.2
[ 23.419793] Call Trace:
[ 23.419864] dump_stack+0xef/0x16e
[ 23.419927] __kasan_report.cold+0x60/0x90
[ 23.420157] ? intel_plane_calc_min_cdclk+0x82/0x440 [i915]
[ 23.420397] intel_plane_calc_min_cdclk+0x82/0x440 [i915]
[ 23.420630] intel_atomic_check+0x455f/0x65a0 [i915]
[ 23.420708] ? mark_held_locks+0x90/0x90
[ 23.420929] ? intel_crtc_duplicate_state+0x2e/0x1b0 [i915]
[ 23.421172] ? intel_plane_duplicate_state+0x2d/0xc0 [i915]
[ 23.421239] ? __drm_dbg+0xa4/0x120
[ 23.421303] ? __kasan_kmalloc.constprop.0+0xc2/0xd0
[ 23.421355] ? __kmalloc_track_caller+0x23a/0x320
[ 23.421602] ? intel_calc_active_pipes+0x1c0/0x1c0 [i915]
[ 23.421852] sanitize_watermarks+0x220/0x510 [i915]
[ 23.422092] ? intel_atomic_check+0x65a0/0x65a0 [i915]
[ 23.422164] ? drm_modeset_unlock_all+0x88/0x130
[ 23.422402] intel_modeset_init+0x1b76/0x3c90 [i915]
[ 23.422647] ? intel_finish_reset+0x2d0/0x2d0 [i915]
[ 23.422851] ? intel_irq_install+0x12c/0x210 [i915]
[ 23.423076] i915_driver_probe+0x13e7/0x2930 [i915]
v2: No crtc is implied by an invisible plane, so the extra !crtc check
is redundant.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200203133824.198872-1-chris@chris-wilson.co.uk1 parent 08e3ed3 commit def8509
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 168 | + | |
| 169 | + | |
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
175 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| |||
0 commit comments