Prev: [135/145] rtc-coh901331: fix braces in resume code
Next: [130/145] drm/i915: Use a dmi quirk to skip a broken SDVO TV output.
From: Greg KH on 12 Mar 2010 19:50 2.6.32-stable review patch. If anyone has any objections, please let me know. ---------------- From: Jerome Glisse <jglisse(a)redhat.com> commit 7e71c9e2e7704ebf044d4a964e02fbd2098a173f upstream. This will avoid oops if at later point the fb is use. Trying to create a framebuffer with no valid GEM object is bogus and should be forbidden as this patch does. Signed-off-by: Jerome Glisse <jglisse(a)redhat.com> Signed-off-by: Dave Airlie <airlied(a)linux.ie> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- drivers/gpu/drm/radeon/radeon_display.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -599,7 +599,11 @@ radeon_user_framebuffer_create(struct dr struct drm_gem_object *obj; obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handle); - + if (obj == NULL) { + dev_err(&dev->pdev->dev, "No GEM object associated to handle 0x%08X, " + "can't create framebuffer\n", mode_cmd->handle); + return NULL; + } return radeon_framebuffer_create(dev, mode_cmd, obj); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |