[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140504011549.04805208@spike>
Date: Sun, 4 May 2014 01:15:49 +0200
From: Christian Engelmayer <cengelma@....at>
To: devel@...verdev.osuosl.org
Cc: john.stultz@...aro.org, serban.constantinescu@....com,
arve@...roid.com, ccross@...roid.com, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] staging: binder: fix usage of uninit scalar in
binder_transaction()
Fix the error path when a cookie mismatch is detected. In that case the
function jumps to the exit label without setting the uninitialized, local
variable 'return_error'. Detected by Coverity - CID 201453.
Signed-off-by: Christian Engelmayer <cengelma@....at>
---
Compile tested and applies against branch staging-next of tree
git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
---
drivers/staging/android/binder.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 1f5e249..ca1b0e3 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1529,6 +1529,7 @@ static void binder_transaction(struct binder_proc *proc,
proc->pid, thread->pid,
(u64)fp->binder, node->debug_id,
(u64)fp->cookie, (u64)node->cookie);
+ return_error = BR_FAILED_REPLY;
goto err_binder_get_ref_for_node_failed;
}
ref = binder_get_ref_for_node(target_proc, node);
--
1.9.1
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists