diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-06-29 15:41:50 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-06-29 15:41:50 -0700 |
| commit | bd48b0a101e8b4979a246f7d9c3e71a3f3175b86 (patch) | |
| tree | 74fbf5280b0e01a29b29784c3f97538fe458a5fe /drivers/gpu | |
| parent | 2f5e49a2188227cd21a0ea630a84975a7658caeb (diff) | |
| parent | 1379d11803ddf193b8be73c18a7533ef0b0bef33 (diff) | |
Merge "msm: kgsl: Add missing check for snapshot IB dump"
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/msm/adreno_snapshot.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/msm/adreno_snapshot.c b/drivers/gpu/msm/adreno_snapshot.c index 6392ec1f069b..3cf601f3b5b8 100644 --- a/drivers/gpu/msm/adreno_snapshot.c +++ b/drivers/gpu/msm/adreno_snapshot.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2019 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 @@ -70,6 +70,19 @@ void kgsl_snapshot_push_object(struct kgsl_process_private *process, for (index = 0; index < objbufptr; index++) { if (objbuf[index].gpuaddr == gpuaddr && objbuf[index].entry->priv == process) { + /* + * Check if newly requested size is within the + * allocated range or not, otherwise continue + * with previous size. + */ + if (!kgsl_gpuaddr_in_memdesc( + &objbuf[index].entry->memdesc, + gpuaddr, dwords << 2)) { + KGSL_CORE_ERR( + "snapshot: IB 0x%016llx size is not within the memdesc range\n", + gpuaddr); + return; + } objbuf[index].size = max_t(uint64_t, objbuf[index].size, |
