diff options
| author | Todd Kjos <[email protected]> | 2021-11-30 10:51:49 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-12-03 14:29:39 +0100 |
| commit | fe6b1869243f23a485a106c214bcfdc7aa0ed593 (patch) | |
| tree | 907c75eaa9c532aec25c7d7e3ceb2491702bc234 /tools/perf/scripts/python/flamegraph.py | |
| parent | 690cfa20d02da5aca6e4c141ff34ef9529843280 (diff) | |
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 <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Todd Kjos <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions