mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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.
This commit is contained in:
commit
b34d8915c4
15 changed files with 207 additions and 75 deletions
|
@ -16,13 +16,13 @@
|
|||
* siglock protection since other code may update expiration cache as
|
||||
* well.
|
||||
*/
|
||||
void update_rlimit_cpu(unsigned long rlim_new)
|
||||
void update_rlimit_cpu(struct task_struct *task, unsigned long rlim_new)
|
||||
{
|
||||
cputime_t cputime = secs_to_cputime(rlim_new);
|
||||
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
set_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
spin_lock_irq(&task->sighand->siglock);
|
||||
set_process_cpu_timer(task, CPUCLOCK_PROF, &cputime, NULL);
|
||||
spin_unlock_irq(&task->sighand->siglock);
|
||||
}
|
||||
|
||||
static int check_clock(const clockid_t which_clock)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue