summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorChristian König2015-08-18 18:23:16 +0200
committerAlex Deucher2015-08-20 23:05:34 +0200
commitb203dd95949ec8d5e30d53446408eb9a4d1bdc62 (patch)
tree487953f129b674d1f2ea7b7fa9704de52f946ee7 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdrm/amdgpu: free the job immediately after dispatching it (diff)
downloadkernel-qcow2-linux-b203dd95949ec8d5e30d53446408eb9a4d1bdc62.tar.gz
kernel-qcow2-linux-b203dd95949ec8d5e30d53446408eb9a4d1bdc62.tar.xz
kernel-qcow2-linux-b203dd95949ec8d5e30d53446408eb9a4d1bdc62.zip
drm/amdgpu: fix zeroing all IB fields manually v2
The problem now is that we don't necessarily call amdgpu_ib_get() in some error paths and so work with uninitialized data. Better require that the memory is already zeroed. v2: better commit message Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 2cf7f52a5650..a592df574939 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -260,7 +260,7 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
}
- p->ibs = kmalloc_array(p->num_ibs, sizeof(struct amdgpu_ib), GFP_KERNEL);
+ p->ibs = kcalloc(p->num_ibs, sizeof(struct amdgpu_ib), GFP_KERNEL);
if (!p->ibs)
r = -ENOMEM;