aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ioprio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-08-20 21:51:29 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-20 21:51:29 -0400
commitf6fdd7d9c273bb2a20ab467cb57067494f932fa3 (patch)
tree4835ce2c366c8a5102d35592ddfdf9f22dd245c6 /fs/ioprio.c
parent7e71af49d46e4c25f17a2c8f53d62ffd14f01007 (diff)
Don't allow normal users to set idle IO priority
It has all the normal priority inversion problems. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ioprio.c')
-rw-r--r--fs/ioprio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 97e1f088ba00..d1c1f2b2c9da 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -62,6 +62,8 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
62 62
63 break; 63 break;
64 case IOPRIO_CLASS_IDLE: 64 case IOPRIO_CLASS_IDLE:
65 if (!capable(CAP_SYS_ADMIN))
66 return -EPERM;
65 break; 67 break;
66 default: 68 default:
67 return -EINVAL; 69 return -EINVAL;