lkml.org 
[lkml]   [2015]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/13] android: binder: fix duplicate error return.
Date
Duplicate errors can be returned to userspace when the thread
error code is left set when the read buffer runs out of space.

Signed-off-by: Riley Andrews <riandrews@android.com>
---
drivers/android/binder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index f1a26d9..2069759 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2167,9 +2167,9 @@ retry:
return -EFAULT;
ptr += sizeof(uint32_t);
binder_stat_br(proc, thread, thread->return_error2);
+ thread->return_error2 = BR_OK;
if (ptr == end)
goto done;
- thread->return_error2 = BR_OK;
}
if (put_user(thread->return_error, (uint32_t __user *)ptr))
return -EFAULT;
--
2.2.0.rc0.207.ga3a616c


\
 
 \ /
  Last update: 2015-05-29 01:21    [W:0.084 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site