diff options
author | Oleg Nesterov <[email protected]> | 2017-10-03 16:15:48 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-10-03 17:54:25 -0700 |
commit | 83f918274e4b841d6fb817861ea0c896fba0c179 (patch) | |
tree | 0dd2089b951b17b706cf1701149092cf56e75503 /tools/perf/util/trace-event-scripting.c | |
parent | baba1b29731c79d605100087b8f02f9e1cf5a344 (diff) |
exec: binfmt_misc: shift filp_close(interp_file) from kill_node() to bm_evict_inode()
To ensure that load_misc_binary() can't use the partially destroyed
Node, see also the next patch.
The current logic looks wrong in any case, once we close interp_file it
doesn't make any sense to delay kfree(inode->i_private), this Node is no
longer valid. Even if the MISC_FMT_OPEN_FILE/interp_file checks were
not racy (they are), load_misc_binary() should not try to reopen
->interpreter if MISC_FMT_OPEN_FILE is set but ->interp_file is NULL.
And I can't understand why do we use filp_close(), not fput().
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Oleg Nesterov <[email protected]>
Acked-by: Kees Cook <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Ben Woodard <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Jim Foraker <[email protected]>
Cc: <[email protected]>
Cc: Travis Gummels <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions