Skip to content

Commit

Permalink
amdkfd: actually allocate longs for the pasid bitmask
Browse files Browse the repository at this point in the history
Commit "amdkfd: use sizeof(long) granularity for the pasid bitmask" calculated
the number of longs it will need, but ended up allocating that number of
bytes rather than longs.

Fix that silly error and allocate the amount of data really required.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
  • Loading branch information
Sasha Levin authored and Oded Gabbay committed Dec 28, 2014
1 parent 611a03d commit 68d0cb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_pasid.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int kfd_pasid_init(void)
{
pasid_limit = max_num_of_processes;

pasid_bitmap = kzalloc(BITS_TO_LONGS(pasid_limit), GFP_KERNEL);
pasid_bitmap = kcalloc(BITS_TO_LONGS(pasid_limit), sizeof(long), GFP_KERNEL);
if (!pasid_bitmap)
return -ENOMEM;

Expand Down

0 comments on commit 68d0cb4

Please sign in to comment.