epoll: clear the tfile_check_list on -ELOOP
authorJason Baron <jbaron@redhat.com>
Wed, 25 Apr 2012 23:01:47 +0000 (16:01 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 25 Jul 2012 03:11:06 +0000 (04:11 +0100)
commit11a5b0b59b9b38e71fa45bd9739a6f4ffa8ce61a
tree0788bb7fb9f4111aa88d02c7a62c7253279df2b0
parentf45c9a6eec20cd712421c442785e7a4e9215a230
epoll: clear the tfile_check_list on -ELOOP

commit 13d518074a952d33d47c428419693f63389547e9 upstream.

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@redhat.com>
Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
Cc: Nelson Elhage <nelhage@nelhage.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Tested-by: Alexandra N. Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/eventpoll.c