Skip to content

Commit 54e54d5

Browse files
committed
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"
2 parents 9c7d619 + 77f4689 commit 54e54d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/eventpoll.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,9 +1995,9 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)
19951995
* during ep_insert().
19961996
*/
19971997
if (list_empty(&epi->ffd.file->f_tfile_llink)) {
1998-
get_file(epi->ffd.file);
1999-
list_add(&epi->ffd.file->f_tfile_llink,
2000-
&tfile_check_list);
1998+
if (get_file_rcu(epi->ffd.file))
1999+
list_add(&epi->ffd.file->f_tfile_llink,
2000+
&tfile_check_list);
20012001
}
20022002
}
20032003
}

0 commit comments

Comments
 (0)