Merge "msm: kgsl: Fix possible use-after-free while adding context to active list"
This commit is contained in:
commit
037d1f7483
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2002,2007-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2002,2007-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
|
@ -475,11 +475,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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue