diff options
author | Oleg Nesterov | 2017-10-04 01:15:55 +0200 |
---|---|---|
committer | Linus Torvalds | 2017-10-04 02:54:25 +0200 |
commit | 43a4f2619038002f48c78698c42c05692d4b4eb2 (patch) | |
tree | ca46e0bb1cbd6a522131f473ce7d7a4d9fe64a43 /drivers/ras | |
parent | exec: binfmt_misc: remove the confusing e->interp_file != NULL checks (diff) | |
download | kernel-qcow2-linux-43a4f2619038002f48c78698c42c05692d4b4eb2.tar.gz kernel-qcow2-linux-43a4f2619038002f48c78698c42c05692d4b4eb2.tar.xz kernel-qcow2-linux-43a4f2619038002f48c78698c42c05692d4b4eb2.zip |
exec: binfmt_misc: fix race between load_misc_binary() and kill_node()
load_misc_binary() makes a local copy of fmt->interpreter under
entries_lock to avoid the race with kill_node() but this is not enough;
the whole Node can be freed after we drop entries_lock, not only the
->interpreter string.
Add dget/dput(fmt->dentry) to ensure bm_evict_inode() can't destroy/free
this Node.
Link: http://lkml.kernel.org/r/20170922143650.GA17227@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: Travis Gummels <tgummels@redhat.com>
Cc: <tdhooge@llnl.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ras')
0 files changed, 0 insertions, 0 deletions