diff options
| author | 2015-06-20 00:19:43 +0530 | |
|---|---|---|
| committer | 2015-07-01 16:27:17 +0530 | |
| commit | 27c95b64b2e4b5ff1288cbaa6e353dd803d71576 (patch) | |
| tree | 47029c3ee1631bd85e9eb95d96b649c856157ce3 /drivers/gpu/msm/adreno_perfcounter.c | |
| parent | bafa8ed2c0d32fa025eca3d9ff188a2dbb5355c6 (diff) | |
msm: kgsl: Cast perfcounter query count to an unsigned int
In adreno_perfcounter_query_group() make sure to cast the user passed
count to an unsigned int before comparing it to the group count.
Otherwise the user count could be interpeted as a signed int and
hilarity ensues.
Change-Id: Ic0dedbad825f5b3fd4434f9b9f6d4d308206c0d9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm/adreno_perfcounter.c')
| -rw-r--r-- | drivers/gpu/msm/adreno_perfcounter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/msm/adreno_perfcounter.c b/drivers/gpu/msm/adreno_perfcounter.c index 1a5b32d..31cd8c5 100644 --- a/drivers/gpu/msm/adreno_perfcounter.c +++ b/drivers/gpu/msm/adreno_perfcounter.c @@ -408,7 +408,7 @@ int adreno_perfcounter_query_group(struct adreno_device *adreno_dev, return 0; } - t = min_t(int, group->reg_count, count); + t = min_t(unsigned int, group->reg_count, count); buf = kmalloc(t * sizeof(unsigned int), GFP_KERNEL); if (buf == NULL) { |
