aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Khandelwal <tushar.khandelwal@arm.com>2017-10-27 05:27:44 +0100
committerArvind Chauhan <arvind.chauhan@arm.com>2017-10-31 12:59:04 +0530
commit961ed86fab380e9c2cbc19b37246cb3028b1422a (patch)
tree531aa86351eac4b4dc1001801de638b035211f05
parent0429a0f0cb68ffac044074a285e9f078d8c2bc22 (diff)
Revert "timerfd: Reject ALARM timerfds without CAP_WAKE_ALARM"
This reverts commit 2895a5e5b3ae78d9923a91fce405d4a2f32c4309. Change-Id: Iee7f61cc1fe92a59b36e84fe75e7bf3a0241ce06 Signed-off-by: Deepak Pandey <Deepak.Pandey@arm.com>
-rw-r--r--fs/timerfd.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c
index ab8dd1538381..1327a02ec778 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -400,11 +400,6 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags)
clockid != CLOCK_BOOTTIME_ALARM))
return -EINVAL;
- if (!capable(CAP_WAKE_ALARM) &&
- (clockid == CLOCK_REALTIME_ALARM ||
- clockid == CLOCK_BOOTTIME_ALARM))
- return -EPERM;
-
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
@@ -449,11 +444,6 @@ static int do_timerfd_settime(int ufd, int flags,
return ret;
ctx = f.file->private_data;
- if (!capable(CAP_WAKE_ALARM) && isalarm(ctx)) {
- fdput(f);
- return -EPERM;
- }
-
timerfd_setup_cancel(ctx, flags);
/*