diff options
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.patch | 43 |
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 @@ | |||
1 | From 4255dce0ae728fe63f19ded56b5dc2c324d6f18d Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Baron <jbaron@redhat.com> | ||
3 | Date: Wed, 25 Apr 2012 16:01:47 -0700 | ||
4 | Subject: [PATCH 023/109] epoll: clear the tfile_check_list on -ELOOP | ||
5 | |||
6 | commit 13d518074a952d33d47c428419693f63389547e9 upstream. | ||
7 | |||
8 | An epoll_ctl(,EPOLL_CTL_ADD,,) operation can return '-ELOOP' to prevent | ||
9 | circular epoll dependencies from being created. However, in that case we | ||
10 | do not properly clear the 'tfile_check_list'. Thus, add a call to | ||
11 | clear_tfile_check_list() for the -ELOOP case. | ||
12 | |||
13 | Signed-off-by: Jason Baron <jbaron@redhat.com> | ||
14 | Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru> | ||
15 | Cc: Nelson Elhage <nelhage@nelhage.com> | ||
16 | Cc: Davide Libenzi <davidel@xmailserver.org> | ||
17 | Tested-by: Alexandra N. Kossovsky <Alexandra.Kossovsky@oktetlabs.ru> | ||
18 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
19 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
20 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
21 | --- | ||
22 | fs/eventpoll.c | 4 +++- | ||
23 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
24 | |||
25 | diff --git a/fs/eventpoll.c b/fs/eventpoll.c | ||
26 | index 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 | -- | ||
42 | 1.7.7.6 | ||
43 | |||