From 771c10f1120fd738c87a54676cef35fd60c82b4e Mon Sep 17 00:00:00 2001 From: Lynus Vaz Date: Mon, 30 Oct 2017 17:50:43 +0530 Subject: [PATCH] msm: kgsl: Use the bind lock when dumping entries Take the bind lock when we dump information about sparse memory allocations through the debugfs node. Change-Id: I955d64d06a259a2bbe4d85a33d68887ee01aad07 Signed-off-by: Lynus Vaz --- drivers/gpu/msm/kgsl_debugfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/msm/kgsl_debugfs.c b/drivers/gpu/msm/kgsl_debugfs.c index 37d92428f02c..592257a332d1 100644 --- a/drivers/gpu/msm/kgsl_debugfs.c +++ b/drivers/gpu/msm/kgsl_debugfs.c @@ -299,6 +299,7 @@ static int print_sparse_mem_entry(int id, void *ptr, void *data) if (!(m->flags & KGSL_MEMFLAGS_SPARSE_VIRT)) return 0; + spin_lock(&entry->bind_lock); node = rb_first(&entry->bind_tree); while (node != NULL) { @@ -309,6 +310,7 @@ static int print_sparse_mem_entry(int id, void *ptr, void *data) obj->v_off, obj->size, obj->p_off); node = rb_next(node); } + spin_unlock(&entry->bind_lock); seq_putc(s, '\n');