Skip to content

Commit

Permalink
binder: change error code from postive to negative in binder_transaction
Browse files Browse the repository at this point in the history
Depending on the context, the error return value
here (extra_buffers_size < added_size) should be
negative.

Acked-by: Martijn Coenen <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Zhang Qilong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Zhang Qilong authored and gregkh committed Nov 9, 2020
1 parent 6c20032 commit 88f6c77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -3103,7 +3103,7 @@ static void binder_transaction(struct binder_proc *proc,
if (extra_buffers_size < added_size) {
/* integer overflow of extra_buffers_size */
return_error = BR_FAILED_REPLY;
return_error_param = EINVAL;
return_error_param = -EINVAL;
return_error_line = __LINE__;
goto err_bad_extra_size;
}
Expand Down

0 comments on commit 88f6c77

Please sign in to comment.