summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/barrier.h
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <koct9i@gmail.com>2014-06-17 02:58:05 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-17 03:21:59 (GMT)
commitebe06187bf2aec10d537ce4595e416035367d703 (patch)
treea428632381694d7de07944ea5398df4dfb20f0e1 /arch/x86/include/asm/barrier.h
parent68986c9f0f4552c34c248501eb0c690553866d6e (diff)
downloadlinux-ebe06187bf2aec10d537ce4595e416035367d703.tar.xz
epoll: fix use-after-free in eventpoll_release_file
This fixes use-after-free of epi->fllink.next inside list loop macro. This loop actually releases elements in the body. The list is rcu-protected but here we cannot hold rcu_read_lock because we need to lock mutex inside. The obvious solution is to use list_for_each_entry_safe(). RCU-ness isn't essential because nobody can change this list under us, it's final fput for this file. The bug was introduced by ae10b2b4eb01 ("epoll: optimize EPOLL_CTL_DEL using rcu") Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com> Reported-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Stable <stable@vger.kernel.org> # 3.13+ Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Jason Baron <jbaron@akamai.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/include/asm/barrier.h')
0 files changed, 0 insertions, 0 deletions