summaryrefslogtreecommitdiffstats
path: root/crypto/algif_aead.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2017-10-03 16:15:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-03 17:54:25 -0700
commit83f918274e4b841d6fb817861ea0c896fba0c179 (patch)
tree0dd2089b951b17b706cf1701149092cf56e75503 /crypto/algif_aead.c
parentbaba1b29731c79d605100087b8f02f9e1cf5a344 (diff)
downloadlinux-83f918274e4b841d6fb817861ea0c896fba0c179.tar.gz
linux-83f918274e4b841d6fb817861ea0c896fba0c179.tar.bz2
linux-83f918274e4b841d6fb817861ea0c896fba0c179.zip
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/20170922143644.GA17216@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Ben Woodard <woodard@redhat.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Jim Foraker <foraker1@llnl.gov> Cc: <tdhooge@llnl.gov> Cc: Travis Gummels <tgummels@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'crypto/algif_aead.c')
0 files changed, 0 insertions, 0 deletions