The patch titled Subject: epoll: clear the tfile_check_list on -ELOOP has been added to the -mm tree. Its filename is epoll-clear-the-tfile_check_list-on-eloop.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jason Baron <jbaron@xxxxxxxxxx> Subject: epoll: clear the tfile_check_list on -ELOOP An epoll_ctl(,EPOLL_CTL_ADD,,) operation can return '-ELOOP' to prevent circular epoll dependencies from being created. However, in that case we do not properly clear the 'tfile_check_list'. Thus, add a call to clear_tfile_check_list() for the -ELOOP case. Signed-off-by: Jason Baron <jbaron@xxxxxxxxxx> Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@xxxxxxxxxxxx> Cc: Nelson Elhage <nelhage@xxxxxxxxxxx> Cc: Davide Libenzi <davidel@xxxxxxxxxxxxxxx> Tested-by: Alexandra N. Kossovsky <Alexandra.Kossovsky@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/eventpoll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN fs/eventpoll.c~epoll-clear-the-tfile_check_list-on-eloop fs/eventpoll.c --- a/fs/eventpoll.c~epoll-clear-the-tfile_check_list-on-eloop +++ a/fs/eventpoll.c @@ -1663,8 +1663,10 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, in if (op == EPOLL_CTL_ADD) { if (is_file_epoll(tfile)) { error = -ELOOP; - if (ep_loop_check(ep, tfile) != 0) + if (ep_loop_check(ep, tfile) != 0) { + clear_tfile_check_list(); goto error_tgt_fput; + } } else list_add(&tfile->f_tfile_llink, &tfile_check_list); } _ Subject: Subject: epoll: clear the tfile_check_list on -ELOOP Patches currently in -mm which might be from jbaron@xxxxxxxxxx are epoll-clear-the-tfile_check_list-on-eloop.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html