[PATCH 3.4 57/65] Revert "drm/radeon: Use drm_calloc_ab for CS relocs"
From: lizf
Date: Mon Oct 19 2015 - 20:54:18 EST
From: Zefan Li <lizefan@xxxxxxxxxx>
3.4.110-rc1 review patch. If anyone has any objections, please let me know.
------------------
This reverts commit 961bd13539b9e7ca5d2e667668141496b7a1d6bc.
Both Satoshi-san and Cal reported a kernel crash due to this commit.
Reported-by: Satoshi Iwamoto <satoshi.iwamoto@xxxxxxxxxxx>
Reported-by: Cal Peake <cp@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Zefan Li <lizefan@xxxxxxxxxx>
---
drivers/gpu/drm/radeon/radeon_cs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index d66d2cd..f3ee360 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -49,7 +49,7 @@ int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
if (p->relocs_ptr == NULL) {
return -ENOMEM;
}
- p->relocs = drm_calloc_large(p->nrelocs, sizeof(struct radeon_bo_list));
+ p->relocs = kcalloc(p->nrelocs, sizeof(struct radeon_cs_reloc), GFP_KERNEL);
if (p->relocs == NULL) {
return -ENOMEM;
}
@@ -324,7 +324,7 @@ static void radeon_cs_parser_fini(struct radeon_cs_parser *parser, int error)
}
}
kfree(parser->track);
- drm_free_large(parser->relocs);
+ kfree(parser->relocs);
kfree(parser->relocs_ptr);
for (i = 0; i < parser->nchunks; i++) {
kfree(parser->chunks[i].kdata);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/