diff options
-rw-r--r-- | fs/eventpoll.c | 2 | ||||
-rw-r--r-- | include/linux/capability.h | 6 | ||||
-rw-r--r-- | include/linux/eventpoll.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 74598f67efe..1c8b5567080 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -1710,7 +1710,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, | |||
1710 | goto error_tgt_fput; | 1710 | goto error_tgt_fput; |
1711 | 1711 | ||
1712 | /* Check if EPOLLWAKEUP is allowed */ | 1712 | /* Check if EPOLLWAKEUP is allowed */ |
1713 | if ((epds.events & EPOLLWAKEUP) && !capable(CAP_EPOLLWAKEUP)) | 1713 | if ((epds.events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) |
1714 | epds.events &= ~EPOLLWAKEUP; | 1714 | epds.events &= ~EPOLLWAKEUP; |
1715 | 1715 | ||
1716 | /* | 1716 | /* |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 68d56effc32..d10b7ed595b 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -360,11 +360,11 @@ struct cpu_vfs_cap_data { | |||
360 | 360 | ||
361 | #define CAP_WAKE_ALARM 35 | 361 | #define CAP_WAKE_ALARM 35 |
362 | 362 | ||
363 | /* Allow preventing system suspends while epoll events are pending */ | 363 | /* Allow preventing system suspends */ |
364 | 364 | ||
365 | #define CAP_EPOLLWAKEUP 36 | 365 | #define CAP_BLOCK_SUSPEND 36 |
366 | 366 | ||
367 | #define CAP_LAST_CAP CAP_EPOLLWAKEUP | 367 | #define CAP_LAST_CAP CAP_BLOCK_SUSPEND |
368 | 368 | ||
369 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) | 369 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) |
370 | 370 | ||
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index 6f8be328770..f4bb378ccf6 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
@@ -34,7 +34,7 @@ | |||
34 | * re-allowed until epoll_wait is called again after consuming the wakeup | 34 | * re-allowed until epoll_wait is called again after consuming the wakeup |
35 | * event(s). | 35 | * event(s). |
36 | * | 36 | * |
37 | * Requires CAP_EPOLLWAKEUP | 37 | * Requires CAP_BLOCK_SUSPEND |
38 | */ | 38 | */ |
39 | #define EPOLLWAKEUP (1 << 29) | 39 | #define EPOLLWAKEUP (1 << 29) |
40 | 40 | ||