diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 15:07:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 15:07:51 -0400 |
commit | b34d8915c413acb51d837a45fb8747b61f65c020 (patch) | |
tree | ced5fac166324634653d84b1afe2b958b3904f4d /include/linux/resource.h | |
parent | e8a89cebdbaab14caaa26debdb4ffd493b8831af (diff) | |
parent | f33ebbe9da2c3c24664a0ad4f8fd83f293547e63 (diff) |
Merge branch 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linux
* 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linux:
unistd: add __NR_prlimit64 syscall numbers
rlimits: implement prlimit64 syscall
rlimits: switch more rlimit syscalls to do_prlimit
rlimits: redo do_setrlimit to more generic do_prlimit
rlimits: add rlimit64 structure
rlimits: do security check under task_lock
rlimits: allow setrlimit to non-current tasks
rlimits: split sys_setrlimit
rlimits: selinux, do rlimits changes under task_lock
rlimits: make sure ->rlim_max never grows in sys_setrlimit
rlimits: add task_struct to update_rlimit_cpu
rlimits: security, add task_struct to setrlimit
Fix up various system call number conflicts. We not only added fanotify
system calls in the meantime, but asm-generic/unistd.h added a wait4
along with a range of reserved per-architecture system calls.
Diffstat (limited to 'include/linux/resource.h')
-rw-r--r-- | include/linux/resource.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/resource.h b/include/linux/resource.h index f1e914eefeab..88d36f9145ba 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h | |||
@@ -43,6 +43,13 @@ struct rlimit { | |||
43 | unsigned long rlim_max; | 43 | unsigned long rlim_max; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | #define RLIM64_INFINITY (~0ULL) | ||
47 | |||
48 | struct rlimit64 { | ||
49 | __u64 rlim_cur; | ||
50 | __u64 rlim_max; | ||
51 | }; | ||
52 | |||
46 | #define PRIO_MIN (-20) | 53 | #define PRIO_MIN (-20) |
47 | #define PRIO_MAX 20 | 54 | #define PRIO_MAX 20 |
48 | 55 | ||
@@ -73,6 +80,8 @@ struct rlimit { | |||
73 | struct task_struct; | 80 | struct task_struct; |
74 | 81 | ||
75 | int getrusage(struct task_struct *p, int who, struct rusage __user *ru); | 82 | int getrusage(struct task_struct *p, int who, struct rusage __user *ru); |
83 | int do_prlimit(struct task_struct *tsk, unsigned int resource, | ||
84 | struct rlimit *new_rlim, struct rlimit *old_rlim); | ||
76 | 85 | ||
77 | #endif /* __KERNEL__ */ | 86 | #endif /* __KERNEL__ */ |
78 | 87 | ||