Skip to contentSkip to conversation

drm/radeon/kms: Fix oops after radeon_cs_parser_init() failure.

PATCH New Michel Dänzer 1 participant 1 message Jan 22, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: Fix oops after radeon_cs_parser_init() failure.

From: Michel Dänzer <[email protected]>

If radeon_cs_parser_init() fails, radeon_cs_ioctl() calls radeon_cs_parser_fini() with the non-zero error value. The latter dereferenced parser->ib which hasn't been initialized yet -> boom. Add a test for parser->ib being non-NULL before dereferencing it.

---
 drivers/gpu/drm/radeon/radeon_cs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/radeon_cs.c +1 -1
index 65590a0..8f46467 100644
@@ -189,7 +189,7 @@ static void radeon_cs_parser_fini(struct radeon_cs_parser *parser, int error)
 {
 	unsigned i;
 
-	if (error) {
+	if (error && parser->ib) {
 		radeon_bo_list_unvalidate(&parser->validated,
 						parser->ib->fence);
 	} else {
Signature · 14 lines
1.6.6


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel