]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: Avoid NULL dereference with component_only tv_modes
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 27 Nov 2009 13:06:56 +0000 (13:06 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 21:44:15 +0000 (13:44 -0800)
commit42af3061f5df34e985eb7b1f72f0e931207a6473
treef98b7df506cd223dd69971713a09b106adc51f45
parent176336ff117105de2d850a959ebd6142dafef2ee
drm/i915: Avoid NULL dereference with component_only tv_modes

commit d271817baecbccb47da0d9f28c285a0dae8a06b7 upstream.

In commit d2d9f2324, the guard for a valid video mode was removed. This
caused the regression:

  kernel crash during kms graphic boot on Intel GM4500 platform
  https://bugzilla.redhat.com/show_bug.cgi?id=540218

This patches changes the logic slightly not to rely on a coupled
variable, but to just check whether the video_modes is valid before
dereferencing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Zhenyu Wang <zhenyu.z.wang@intel.com>
[ickle: Actually reference the correct bug report]
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/intel_tv.c