]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/eventpoll.c
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
[karo-tx-linux.git] / fs / eventpoll.c
index b1c8e23ddf65b308bfed50193bf57c39bcc18f2b..a6d194831ed86af3d2a9c900a3e3f7e397f019cc 100644 (file)
@@ -1748,6 +1748,16 @@ fetch_events:
                         * to TASK_INTERRUPTIBLE before doing the checks.
                         */
                        set_current_state(TASK_INTERRUPTIBLE);
+                       /*
+                        * Always short-circuit for fatal signals to allow
+                        * threads to make a timely exit without the chance of
+                        * finding more events available and fetching
+                        * repeatedly.
+                        */
+                       if (fatal_signal_pending(current)) {
+                               res = -EINTR;
+                               break;
+                       }
                        if (ep_events_available(ep) || timed_out)
                                break;
                        if (signal_pending(current)) {