driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] binder: change error code from postive to negative in binder_transaction
@ 2020-10-26 11:03 Zhang Qilong
  2020-10-27  8:29 ` Martijn Coenen
  2020-10-29 15:35 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Zhang Qilong @ 2020-10-26 11:03 UTC (permalink / raw)
  To: gregkh, arve, tkjos, maco, joel, christian, hridya, surenb; +Cc: devel

Depending on the context, the error return value
here (extra_buffers_size < added_size) should be
negative.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.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 b5117576792b..8bbfb9124fa2 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -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;
 		}
-- 
2.17.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH -next] binder: change error code from postive to negative in binder_transaction
  2020-10-26 11:03 [PATCH -next] binder: change error code from postive to negative in binder_transaction Zhang Qilong
@ 2020-10-27  8:29 ` Martijn Coenen
  2020-10-29 15:35 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Martijn Coenen @ 2020-10-27  8:29 UTC (permalink / raw)
  To: Zhang Qilong
  Cc: open list:ANDROID DRIVERS, Todd Kjos, Greg KH, Hridya Valsaraju,
	Arve Hjønnevåg, Joel Fernandes, Suren Baghdasaryan,
	Christian Brauner

Thanks!

On Mon, Oct 26, 2020 at 11:52 AM Zhang Qilong <zhangqilong3@huawei.com> wrote:
>
> Depending on the context, the error return value
> here (extra_buffers_size < added_size) should be
> negative.
>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Martijn Coenen <maco@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 b5117576792b..8bbfb9124fa2 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -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;
>                 }
> --
> 2.17.1
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH -next] binder: change error code from postive to negative in binder_transaction
  2020-10-26 11:03 [PATCH -next] binder: change error code from postive to negative in binder_transaction Zhang Qilong
  2020-10-27  8:29 ` Martijn Coenen
@ 2020-10-29 15:35 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2020-10-29 15:35 UTC (permalink / raw)
  To: Zhang Qilong
  Cc: devel, tkjos, gregkh, surenb, hridya, arve, joel, maco, christian

On Mon, Oct 26, 2020 at 07:03:14PM +0800, Zhang Qilong wrote:
> Depending on the context, the error return value
> here (extra_buffers_size < added_size) should be
> negative.
> 
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---

Thanks!
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-10-29 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 11:03 [PATCH -next] binder: change error code from postive to negative in binder_transaction Zhang Qilong
2020-10-27  8:29 ` Martijn Coenen
2020-10-29 15:35 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).