From: Greg Kroah-Hartman Date: Wed, 21 May 2014 07:14:57 +0000 (+0900) Subject: 3.14-stable patches X-Git-Tag: v3.10.41~4 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=e05337e6b29047305d31224b009f147166303e72;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: drm-i915-do-not-dereference-pointers-from-ring-buffer-in-evict-event.patch drm-i915-tv-fix-gen4-composite-s-video-tv-out.patch --- diff --git a/queue-3.14/drm-i915-do-not-dereference-pointers-from-ring-buffer-in-evict-event.patch b/queue-3.14/drm-i915-do-not-dereference-pointers-from-ring-buffer-in-evict-event.patch new file mode 100644 index 00000000000..615f87ae798 --- /dev/null +++ b/queue-3.14/drm-i915-do-not-dereference-pointers-from-ring-buffer-in-evict-event.patch @@ -0,0 +1,50 @@ +From 9297ebf29ad9118edd6c0fedc84f03e35028827d Mon Sep 17 00:00:00 2001 +From: Steven Rostedt +Date: Tue, 18 Mar 2014 11:27:37 -0400 +Subject: drm/i915: Do not dereference pointers from ring buffer in evict event + +From: Steven Rostedt + +commit 9297ebf29ad9118edd6c0fedc84f03e35028827d upstream. + +The TP_printk() should never dereference any pointers, because the ring +buffer can be read at some unknown time in the future. If a device no +longer exists, it can cause a kernel oops. This also makes this +event useless when saving the ring buffer in userspaces tools such as +perf and trace-cmd. + +The i915_gem_evict_vm dereferences the vm pointer which may also not +exist when the ring buffer is read sometime in the future. + +Link: http://lkml.kernel.org/r/1395095198-20034-3-git-send-email-artagnon@gmail.com +Reported-by: Ramkumar Ramachandra +Fixes: bcccff847d1f "drm/i915: trace vm eviction instead of everything" +Signed-off-by: Steven Rostedt +[danvet: Try to make it actually compile] +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_trace.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/i915_trace.h ++++ b/drivers/gpu/drm/i915/i915_trace.h +@@ -238,14 +238,16 @@ TRACE_EVENT(i915_gem_evict_vm, + TP_ARGS(vm), + + TP_STRUCT__entry( ++ __field(u32, dev) + __field(struct i915_address_space *, vm) + ), + + TP_fast_assign( ++ __entry->dev = vm->dev->primary->index; + __entry->vm = vm; + ), + +- TP_printk("dev=%d, vm=%p", __entry->vm->dev->primary->index, __entry->vm) ++ TP_printk("dev=%d, vm=%p", __entry->dev, __entry->vm) + ); + + TRACE_EVENT(i915_gem_ring_sync_to, diff --git a/queue-3.14/drm-i915-tv-fix-gen4-composite-s-video-tv-out.patch b/queue-3.14/drm-i915-tv-fix-gen4-composite-s-video-tv-out.patch new file mode 100644 index 00000000000..04876f3af55 --- /dev/null +++ b/queue-3.14/drm-i915-tv-fix-gen4-composite-s-video-tv-out.patch @@ -0,0 +1,50 @@ +From e1f23f3dd817f53f622e486913ac662add46eeed Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Fri, 28 Mar 2014 08:54:04 +0200 +Subject: drm/i915/tv: fix gen4 composite s-video tv-out + +From: Jani Nikula + +commit e1f23f3dd817f53f622e486913ac662add46eeed upstream. + +This is *not* bisected, but the likely regression is + +commit c35614380d5c956bfda20eab2755b2f5a7d6f1e7 +Author: Zhao Yakui +Date: Tue Nov 24 09:48:48 2009 +0800 + + drm/i915: Don't set up the TV port if it isn't in the BIOS table. + +The commit does not check for all TV device types that might be present +in the VBT, disabling TV out for the missing ones. Add composite +S-video. + +Reported-and-tested-by: Matthew Khouzam +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73362 +Signed-off-by: Jani Nikula +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_tv.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_tv.c ++++ b/drivers/gpu/drm/i915/intel_tv.c +@@ -1536,9 +1536,14 @@ static int tv_is_present_in_vbt(struct d + /* + * If the device type is not TV, continue. + */ +- if (p_child->old.device_type != DEVICE_TYPE_INT_TV && +- p_child->old.device_type != DEVICE_TYPE_TV) ++ switch (p_child->old.device_type) { ++ case DEVICE_TYPE_INT_TV: ++ case DEVICE_TYPE_TV: ++ case DEVICE_TYPE_TV_SVIDEO_COMPOSITE: ++ break; ++ default: + continue; ++ } + /* Only when the addin_offset is non-zero, it is regarded + * as present. + */ diff --git a/queue-3.14/series b/queue-3.14/series index c090a1ad9e6..6d54c09e6cd 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -60,3 +60,5 @@ drm-radeon-clear-needs_reset-flag-if-ib-test-fails.patch drm-radeon-call-drm_edid_to_eld-when-we-update-the-edid.patch drm-radeon-fix-endian-swap-on-hawaii-clear-state-buffer-setup.patch drm-radeon-fix-typo-in-spectre_golden_registers.patch +drm-i915-tv-fix-gen4-composite-s-video-tv-out.patch +drm-i915-do-not-dereference-pointers-from-ring-buffer-in-evict-event.patch