summaryrefslogtreecommitdiff
path: root/arch/arm/mach-digicolor
diff options
context:
space:
mode:
authorTodd Kjos <tkjos@google.com>2021-11-30 21:51:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-03 16:29:39 +0300
commitfe6b1869243f23a485a106c214bcfdc7aa0ed593 (patch)
tree907c75eaa9c532aec25c7d7e3ceb2491702bc234 /arch/arm/mach-digicolor
parent690cfa20d02da5aca6e4c141ff34ef9529843280 (diff)
downloadlinux-fe6b1869243f23a485a106c214bcfdc7aa0ed593.tar.xz
binder: fix handling of error during copy
If a memory copy function fails to copy the whole buffer, a positive integar with the remaining bytes is returned. In binder_translate_fd_array() this can result in an fd being skipped due to the failed copy, but the loop continues processing fds since the early return condition expects a negative integer on error. Fix by returning "ret > 0 ? -EINVAL : ret" to handle this case. Fixes: bb4a2e48d510 ("binder: return errors from buffer copy functions") Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Todd Kjos <tkjos@google.com> Link: https://lore.kernel.org/r/20211130185152.437403-2-tkjos@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/mach-digicolor')
0 files changed, 0 insertions, 0 deletions