[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1525851089096.52313@xiaomi.com>
Date: Wed, 9 May 2018 07:31:29 +0000
From: 宋金时 <songjinshi@...omi.com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"maco@...roid.com" <maco@...roid.com>,
"tkjos@...gle.com" <tkjos@...gle.com>,
"arve@...roid.com" <arve@...roid.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] ANDROID: binder: correct the cmd print for
BINDER_WORK_RETURN_ERROR
In case of the BINDER_WORK_RETURN_ERROR the cmd is no assignment,
so it's value will be old value or dirty value, before modifying
e->cmd, assign the value of the e->cmd to cmd to ensure the correct
print of binder_stat_br.
Signed-off-by: songjinshi <songjinshi@...omi.com>
---
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 4ffc84d..acd7d44a 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -4086,6 +4086,7 @@
struct binder_error *e = container_of(
w, struct binder_error, work);
+ cmd = e->cmd;
WARN_ON(e->cmd == BR_OK);
binder_inner_proc_unlock(proc);
if (put_user(e->cmd, (uint32_t __user *)ptr))
Powered by blists - more mailing lists