[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211125063738.GK6514@kadam>
Date: Thu, 25 Nov 2021 09:37:38 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Todd Kjos <tkjos@...gle.com>
Cc: devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, arve@...roid.com, maco@...gle.com,
joel@...lfernandes.org, kernel-team@...roid.com,
christian@...uner.io
Subject: Re: [PATCH 2/3] binder: read pre-translated fds from sender buffer
On Wed, Nov 24, 2021 at 12:33:20PM -0800, Todd Kjos wrote:
> I agree -- if copy_from_user() for some reason doesn't copy the whole
> buffer, it might return a positive integer. Then it would skip
> binder_translate_fd(), but not return. That should probably be
> something like:
>
> if (ret)
> return ret > 0 ? -EINVAL : ret;
>
> Will fix in next version.
It should really be a separate patch at the start of the series because
it's from the original code and unrelated.
regards,
dan carpenter
Powered by blists - more mailing lists