summary refs log tree commit diff
path: root/drivers/android/binder_alloc.c
diff options
context:
space:
mode:
authorTodd Kjos <tkjos@android.com>2018-11-06 15:56:31 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-26 20:12:05 +0100
commit324fa64cf4189094bc4df744a9e7214a1b81d845 (patch)
treecb166960a5b3b450a5d47be23657c6ba2a463aca /drivers/android/binder_alloc.c
parent1dbfe7f23bdb7238c72d8efcffcd75280ff71d20 (diff)
downloadlinux-324fa64cf4189094bc4df744a9e7214a1b81d845.tar.gz
binder: fix sparse warnings on locking context
Add __acquire()/__release() annnotations to fix warnings
in sparse context checking

There is one case where the warning was due to a lack of
a "default:" case in a switch statement where a lock was
being released in each of the cases, so the default
case was added.

Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/binder_alloc.c')
-rw-r--r--drivers/android/binder_alloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 64fd96eada31..52eb11edf000 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -943,6 +943,7 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
 				       struct list_lru_one *lru,
 				       spinlock_t *lock,
 				       void *cb_arg)
+	__must_hold(lock)
 {
 	struct mm_struct *mm = NULL;
 	struct binder_lru_page *page = container_of(item,