提交 a5e13512 编写于 作者: L Linus Torvalds

Merge tag 'pm-post-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull a last-minute PM update from Rafael J. Wysocki:
 "This renames CAP_EPOLLWAKEUP to CAP_BLOCK_SUSPEND to encourage future
  reuse of the capability in question in related cases."

* tag 'pm-post-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM: Rename CAP_EPOLLWAKEUP to CAP_BLOCK_SUSPEND
...@@ -1710,7 +1710,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, ...@@ -1710,7 +1710,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
goto error_tgt_fput; goto error_tgt_fput;
/* Check if EPOLLWAKEUP is allowed */ /* Check if EPOLLWAKEUP is allowed */
if ((epds.events & EPOLLWAKEUP) && !capable(CAP_EPOLLWAKEUP)) if ((epds.events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND))
epds.events &= ~EPOLLWAKEUP; epds.events &= ~EPOLLWAKEUP;
/* /*
......
...@@ -360,11 +360,11 @@ struct cpu_vfs_cap_data { ...@@ -360,11 +360,11 @@ struct cpu_vfs_cap_data {
#define CAP_WAKE_ALARM 35 #define CAP_WAKE_ALARM 35
/* Allow preventing system suspends while epoll events are pending */ /* Allow preventing system suspends */
#define CAP_EPOLLWAKEUP 36 #define CAP_BLOCK_SUSPEND 36
#define CAP_LAST_CAP CAP_EPOLLWAKEUP #define CAP_LAST_CAP CAP_BLOCK_SUSPEND
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
* re-allowed until epoll_wait is called again after consuming the wakeup * re-allowed until epoll_wait is called again after consuming the wakeup
* event(s). * event(s).
* *
* Requires CAP_EPOLLWAKEUP * Requires CAP_BLOCK_SUSPEND
*/ */
#define EPOLLWAKEUP (1 << 29) #define EPOLLWAKEUP (1 << 29)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册