All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: binder: fix usage of uninit scalar in binder_transaction()
@ 2014-05-03 23:15 Christian Engelmayer
  2014-05-06 23:33 ` Arve Hjønnevåg
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Engelmayer @ 2014-05-03 23:15 UTC (permalink / raw)
  To: devel
  Cc: john.stultz, serban.constantinescu, arve, ccross, gregkh, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

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@gmx.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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: binder: fix usage of uninit scalar in binder_transaction()
  2014-05-03 23:15 [PATCH] staging: binder: fix usage of uninit scalar in binder_transaction() Christian Engelmayer
@ 2014-05-06 23:33 ` Arve Hjønnevåg
  0 siblings, 0 replies; 2+ messages in thread
From: Arve Hjønnevåg @ 2014-05-06 23:33 UTC (permalink / raw)
  To: Christian Engelmayer
  Cc: devel, John Stultz, Serban Constantinescu, Colin Cross, Greg KH, LKML

On Sat, May 3, 2014 at 4:15 PM, Christian Engelmayer <cengelma@gmx.at> wrote:
> 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@gmx.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

Acked-by: Arve Hjønnevåg <arve@android.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-06 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-03 23:15 [PATCH] staging: binder: fix usage of uninit scalar in binder_transaction() Christian Engelmayer
2014-05-06 23:33 ` Arve Hjønnevåg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.