summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0023-epoll-clear-the-tfile_check_list-on-ELOOP.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0023-epoll-clear-the-tfile_check_list-on-ELOOP.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0023-epoll-clear-the-tfile_check_list-on-ELOOP.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0023-epoll-clear-the-tfile_check_list-on-ELOOP.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0023-epoll-clear-the-tfile_check_list-on-ELOOP.patch
new file mode 100644
index 00000000..8dbe37d6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0023-epoll-clear-the-tfile_check_list-on-ELOOP.patch
@@ -0,0 +1,43 @@
1From 4255dce0ae728fe63f19ded56b5dc2c324d6f18d Mon Sep 17 00:00:00 2001
2From: Jason Baron <jbaron@redhat.com>
3Date: Wed, 25 Apr 2012 16:01:47 -0700
4Subject: [PATCH 023/109] epoll: clear the tfile_check_list on -ELOOP
5
6commit 13d518074a952d33d47c428419693f63389547e9 upstream.
7
8An epoll_ctl(,EPOLL_CTL_ADD,,) operation can return '-ELOOP' to prevent
9circular epoll dependencies from being created. However, in that case we
10do not properly clear the 'tfile_check_list'. Thus, add a call to
11clear_tfile_check_list() for the -ELOOP case.
12
13Signed-off-by: Jason Baron <jbaron@redhat.com>
14Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
15Cc: Nelson Elhage <nelhage@nelhage.com>
16Cc: Davide Libenzi <davidel@xmailserver.org>
17Tested-by: Alexandra N. Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
18Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
19Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
20Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
21---
22 fs/eventpoll.c | 4 +++-
23 1 files changed, 3 insertions(+), 1 deletions(-)
24
25diff --git a/fs/eventpoll.c b/fs/eventpoll.c
26index 4d9d3a4..a6f3763 100644
27--- a/fs/eventpoll.c
28+++ b/fs/eventpoll.c
29@@ -1629,8 +1629,10 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
30 if (op == EPOLL_CTL_ADD) {
31 if (is_file_epoll(tfile)) {
32 error = -ELOOP;
33- if (ep_loop_check(ep, tfile) != 0)
34+ if (ep_loop_check(ep, tfile) != 0) {
35+ clear_tfile_check_list();
36 goto error_tgt_fput;
37+ }
38 } else
39 list_add(&tfile->f_tfile_llink, &tfile_check_list);
40 }
41--
421.7.7.6
43