aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-09-02 11:29:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-09-02 11:29:34 -0700
commit54e54d58184e34887cc40d0bc83720dbaf57db1a (patch)
tree63339d4d456b89c11b01da35b3b84542eca492cb /fs
parentMerge tag 'perf-tools-fixes-for-v5.9-2020-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux (diff)
parentfix regression in "epoll: Keep a reference on files added to the check list" (diff)
downloadlinux-dev-54e54d58184e34887cc40d0bc83720dbaf57db1a.tar.xz
linux-dev-54e54d58184e34887cc40d0bc83720dbaf57db1a.zip
Merge branch 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull epoll fixup from Al Viro: "Fixup for epoll regression; there's a better solution longer term, but this is the least intrusive fix" * 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix regression in "epoll: Keep a reference on files added to the check list"
Diffstat (limited to 'fs')
-rw-r--r--fs/eventpoll.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index e0decff22ae2..8107e06d7f6f 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1995,9 +1995,9 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)
* during ep_insert().
*/
if (list_empty(&epi->ffd.file->f_tfile_llink)) {
- get_file(epi->ffd.file);
- list_add(&epi->ffd.file->f_tfile_llink,
- &tfile_check_list);
+ if (get_file_rcu(epi->ffd.file))
+ list_add(&epi->ffd.file->f_tfile_llink,
+ &tfile_check_list);
}
}
}