[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100720014251.46b91cdd@mad-cat.localdomain>
Date: Tue, 20 Jul 2010 01:42:51 +0400
From: "Alexander Y. Fomichev" <git.user@...il.com>
To: Dave Airlie <airlied@...hat.com>,
Alex Deucher <alexdeucher@...il.com>,
Robert Noland <rnoland@...p.net>,
Matt Turner <mattst88@...il.com>,
Jerome Glisse <jglisse@...hat.com>, akpm@...ux-foundation.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: drivers/gpu/drm/radeon/r600_blit.c: fix possible NULL pointer
derefernce
This patch fix possible NULL pointer dereference when
r600_prepare_blit_copy tries to fill dev_priv->blit_vb->file_priv
without check of dev_priv->blit_vb. dev_priv->blit_vb should be
filled by r600_nomm_get_vb but latest can fail with EAGAIN.
Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=16375
---
drivers/gpu/drm/radeon/r600_blit.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c
index f4fb88e..0df4a2b 100644
--- a/drivers/gpu/drm/radeon/r600_blit.c
+++ b/drivers/gpu/drm/radeon/r600_blit.c
@@ -541,6 +541,8 @@ r600_prepare_blit_copy(struct drm_device *dev, struct drm_file *file_priv)
DRM_DEBUG("\n");
r600_nomm_get_vb(dev);
+ if (!dev_priv->blit_vb)
+ return;
dev_priv->blit_vb->file_priv = file_priv;
--
1.7.1.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists