summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm
diff options
context:
space:
mode:
authorHarshdeep Dhatt <hdhatt@codeaurora.org>2016-01-13 16:16:04 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:18:28 -0700
commite34ca145b3f8fefc56d00d9de6f9ac2639f5f460 (patch)
tree42756934617bf067370d8105ebd3841f4558fb56 /drivers/gpu/msm
parentb13117245984581accf2ea585e7030e26b36c2c3 (diff)
msm: kgsl: Fix the snapshot mempool size calculation
The snapshot mempool size takes into account the memory required for section headers. It was being calculated based on old header structure. Update that to avoid corruption/ buffer overflow of the mempool memory. Change-Id: I07274934e4c0dced707e03be3e31b2459e00d706 Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm')
-rw-r--r--drivers/gpu/msm/kgsl_snapshot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/msm/kgsl_snapshot.c b/drivers/gpu/msm/kgsl_snapshot.c
index 0977d1477b6a..efaa612fe2c6 100644
--- a/drivers/gpu/msm/kgsl_snapshot.c
+++ b/drivers/gpu/msm/kgsl_snapshot.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1027,7 +1027,7 @@ void kgsl_snapshot_save_frozen_objs(struct work_struct *work)
obj->size = ALIGN(obj->size, 4);
size += ((size_t) obj->size +
- sizeof(struct kgsl_snapshot_gpu_object) +
+ sizeof(struct kgsl_snapshot_gpu_object_v2) +
sizeof(struct kgsl_snapshot_section_header));
}