diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2020-08-19 01:30:40 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-08-19 01:30:39 -0700 |
| commit | 3ce5f98da0b93a56300378d6ebf3549226ecc5aa (patch) | |
| tree | 9a49a2a7363ebe327a0b00bd5af6f497d0f1ce26 | |
| parent | 24acf6990971eb1a9858aee33ffa0523bbcd219f (diff) | |
| parent | 3ba217f1e4b5569d4adf683f6eab3c047476a9c2 (diff) | |
Merge "msm: kgsl: Fix possible use-after-free while adding context to active list"
| -rw-r--r-- | drivers/gpu/msm/adreno_drawctxt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/msm/adreno_drawctxt.c b/drivers/gpu/msm/adreno_drawctxt.c index 3e765a61bd5e..446df0e98217 100644 --- a/drivers/gpu/msm/adreno_drawctxt.c +++ b/drivers/gpu/msm/adreno_drawctxt.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002,2007-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2002,2007-2017,2020, 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 @@ -473,11 +473,12 @@ void adreno_drawctxt_detach(struct kgsl_context *context) drawctxt = ADRENO_CONTEXT(context); rb = drawctxt->rb; + spin_lock(&drawctxt->lock); + spin_lock(&adreno_dev->active_list_lock); list_del_init(&drawctxt->active_node); spin_unlock(&adreno_dev->active_list_lock); - spin_lock(&drawctxt->lock); count = drawctxt_detach_drawobjs(drawctxt, list); spin_unlock(&drawctxt->lock); |
