aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2013-09-11 14:24:46 -0700
committerLinus Torvalds <[email protected]>2013-09-11 15:59:09 -0700
commit6b3c538f5b2cfc53cb6803ec5001bbcf8f18a98e (patch)
tree5a3dd78b655c93d7248facb2377be2630435b1fc /tools/perf/scripts/python
parent4e0621a07ea58a0dc15859be3b743bdeb194a51b (diff)
exec: cleanup the error handling in search_binary_handler()
The error hanling and ret-from-loop look confusing and inconsistent. - "retval >= 0" simply returns - "!bprm->file" returns too but with read_unlock() because binfmt_lock was already re-acquired - "retval != -ENOEXEC || bprm->mm == NULL" does "break" and relies on the same check after the main loop Consolidate these checks into a single if/return statement. need_retry still checks "retval == -ENOEXEC", but this and -ENOENT before the main loop are not needed. This is only for pathological and impossible list_empty(&formats) case. It is not clear why do we check "bprm->mm == NULL", probably this should be removed. Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Kees Cook <[email protected]> Cc: Al Viro <[email protected]> Cc: Evgeniy Polyakov <[email protected]> Cc: Zach Levis <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions