[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358379788.7243.10.camel@lorien2>
Date: Wed, 16 Jan 2013 16:43:08 -0700
From: Shuah Khan <shuah.khan@...com>
To: airlied@...ux.ie, deathsimple@...afone.de, jglisse@...hat.com,
airlied@...hat.com, alexander.deucher@....com
Cc: dri-devel@...ts.freedesktop.org,
LKML <linux-kernel@...r.kernel.org>, shuahkhan@...il.com,
Greg KH <gregkh@...uxfoundation.org>
Subject: [PATCH] drm/radeon: fix NULL pointer dereference in UMS mode in
radeon_cs_parser_fini()
Fix parser->rdev NULL pointer dereference in radeon_cs_parser_fini().
While back-porting drm/radeon: fix NULL pointer dereference in UMS mode
patch (commit-id: ff4bd0827764e10a428a9d39e6814c5478863f94) to 3,7.y, noticed
another instance of NULL pointer dereference in radeon_cs_parser_fini()
function.
Signed-off-by: Shuah Khan <shuah.khan@...com>
CC: stable@...r.kernel.org 3.7
---
drivers/gpu/drm/radeon/radeon_cs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 469661f..d1c282c 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -329,7 +329,7 @@ static void radeon_cs_parser_fini(struct radeon_cs_parser *parser, int error)
kfree(parser->relocs_ptr);
for (i = 0; i < parser->nchunks; i++) {
kfree(parser->chunks[i].kdata);
- if ((parser->rdev->flags & RADEON_IS_AGP)) {
+ if (parser->rdev && (parser->rdev->flags & RADEON_IS_AGP)) {
kfree(parser->chunks[i].kpage[0]);
kfree(parser->chunks[i].kpage[1]);
}
--
1.7.9.5
--
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