]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit355a1ed6e1a2be6137de5c625d12af379b070deb
treedfbcc71256c2129d2e0ee3e077461103338b9591
parenta35c389bb0d4ce9a8f583cb17c6fa391fd363168
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