epoll: don't use current in irq context
authorTony Battersby <tonyb@cybernetics.com>
Tue, 31 Mar 2009 22:24:13 +0000 (15:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:19 +0000 (08:59 -0700)
commitabff55cee1039b5a3b96f7a5eb6e65b9f247a274
treedfbcc71256c2129d2e0ee3e077461103338b9591
parentbb57c3edcd2fc51d95914c39448f36e43af9d6af
epoll: don't use current in irq context

ep_call_nested() (formerly ep_poll_safewake()) uses "current" (without
dereferencing it) to detect callback recursion, but it may be called from
irq context where the use of current is generally discouraged.  It would
be better to use get_cpu() and put_cpu() to detect the callback recursion.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/eventpoll.c