diff options
| author | Tejun Heo <tj@kernel.org> | 2012-04-01 15:30:01 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2012-04-01 15:55:00 -0400 |
| commit | 959d851caa48829eb85cb85aa949fd6b4c5d5bc6 (patch) | |
| tree | 3ba9c94ec346275fb44c4f0d1cd2537cdff8d811 /kernel/sys.c | |
| parent | a5567932fc926739e29e98487128080f40c61710 (diff) | |
| parent | 48ddbe194623ae089cc0576e60363f2d2e85662a (diff) | |
Merge branch 'for-3.5' of ../cgroup into block/for-3.5/core-merged
cgroup/for-3.5 contains the following changes which blk-cgroup needs
to proceed with the on-going cleanup.
* Dynamic addition and removal of cftypes to make config/stat file
handling modular for policies.
* cgroup removal update to not wait for css references to drain to fix
blkcg removal hang caused by cfq caching cfqgs.
Pull in cgroup/for-3.5 into block/for-3.5/core. This causes the
following conflicts in block/blk-cgroup.c.
* 761b3ef50e "cgroup: remove cgroup_subsys argument from callbacks"
conflicts with blkiocg_pre_destroy() addition and blkiocg_attach()
removal. Resolved by removing @subsys from all subsys methods.
* 676f7c8f84 "cgroup: relocate cftype and cgroup_subsys definitions in
controllers" conflicts with ->pre_destroy() and ->attach() updates
and removal of modular config. Resolved by dropping forward
declarations of the methods and applying updates to the relocated
blkio_subsys.
* 4baf6e3325 "cgroup: convert all non-memcg controllers to the new
cftype interface" builds upon the previous item. Resolved by adding
->base_cftypes to the relocated blkio_subsys.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/sys.c')
| -rw-r--r-- | kernel/sys.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 40701538fbd1..e7006eb6c1e4 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
| @@ -444,6 +444,15 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, | |||
| 444 | magic2 != LINUX_REBOOT_MAGIC2C)) | 444 | magic2 != LINUX_REBOOT_MAGIC2C)) |
| 445 | return -EINVAL; | 445 | return -EINVAL; |
| 446 | 446 | ||
| 447 | /* | ||
| 448 | * If pid namespaces are enabled and the current task is in a child | ||
| 449 | * pid_namespace, the command is handled by reboot_pid_ns() which will | ||
| 450 | * call do_exit(). | ||
| 451 | */ | ||
| 452 | ret = reboot_pid_ns(task_active_pid_ns(current), cmd); | ||
| 453 | if (ret) | ||
| 454 | return ret; | ||
| 455 | |||
| 447 | /* Instead of trying to make the power_off code look like | 456 | /* Instead of trying to make the power_off code look like |
| 448 | * halt when pm_power_off is not set do it the easy way. | 457 | * halt when pm_power_off is not set do it the easy way. |
| 449 | */ | 458 | */ |
| @@ -1706,7 +1715,7 @@ static int prctl_set_mm(int opt, unsigned long addr, | |||
| 1706 | if (arg4 | arg5) | 1715 | if (arg4 | arg5) |
| 1707 | return -EINVAL; | 1716 | return -EINVAL; |
| 1708 | 1717 | ||
| 1709 | if (!capable(CAP_SYS_ADMIN)) | 1718 | if (!capable(CAP_SYS_RESOURCE)) |
| 1710 | return -EPERM; | 1719 | return -EPERM; |
| 1711 | 1720 | ||
| 1712 | if (addr >= TASK_SIZE) | 1721 | if (addr >= TASK_SIZE) |
| @@ -1962,6 +1971,14 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, | |||
| 1962 | case PR_SET_MM: | 1971 | case PR_SET_MM: |
| 1963 | error = prctl_set_mm(arg2, arg3, arg4, arg5); | 1972 | error = prctl_set_mm(arg2, arg3, arg4, arg5); |
| 1964 | break; | 1973 | break; |
| 1974 | case PR_SET_CHILD_SUBREAPER: | ||
| 1975 | me->signal->is_child_subreaper = !!arg2; | ||
| 1976 | error = 0; | ||
| 1977 | break; | ||
| 1978 | case PR_GET_CHILD_SUBREAPER: | ||
| 1979 | error = put_user(me->signal->is_child_subreaper, | ||
| 1980 | (int __user *) arg2); | ||
| 1981 | break; | ||
| 1965 | default: | 1982 | default: |
| 1966 | error = -EINVAL; | 1983 | error = -EINVAL; |
| 1967 | break; | 1984 | break; |
