Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
[firefly-linux-kernel-4.4.55.git] / fs / eventpoll.c
index 2cf0f2153be57ddcf6bc782d1f15fa5d2386d8a7..079d1be65ba9e61e6f0452ecffc0cd23a6c3987d 100644 (file)
@@ -1711,7 +1711,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
 
        /* Check if EPOLLWAKEUP is allowed */
        if ((epds.events & EPOLLWAKEUP) && !capable(CAP_EPOLLWAKEUP))
-               goto error_tgt_fput;
+               epds.events &= ~EPOLLWAKEUP;
 
        /*
         * We have to check that the file structure underneath the file descriptor