lkml.org 
[lkml]   [2018]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ANDROID: binder: correct the cmd print for BINDER_WORK_RETURN_ERROR
Date
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@xiaomi.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))
\
 
 \ /
  Last update: 2018-05-09 09:48    [W:0.038 / U:1.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site