diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 449b81b98b3d..8ae2e636eb1b 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/getcpu.h> | 32 | #include <linux/getcpu.h> |
33 | #include <linux/task_io_accounting_ops.h> | 33 | #include <linux/task_io_accounting_ops.h> |
34 | #include <linux/seccomp.h> | 34 | #include <linux/seccomp.h> |
35 | #include <linux/cpu.h> | ||
35 | 36 | ||
36 | #include <linux/compat.h> | 37 | #include <linux/compat.h> |
37 | #include <linux/syscalls.h> | 38 | #include <linux/syscalls.h> |
@@ -878,6 +879,7 @@ void kernel_power_off(void) | |||
878 | kernel_shutdown_prepare(SYSTEM_POWER_OFF); | 879 | kernel_shutdown_prepare(SYSTEM_POWER_OFF); |
879 | if (pm_power_off_prepare) | 880 | if (pm_power_off_prepare) |
880 | pm_power_off_prepare(); | 881 | pm_power_off_prepare(); |
882 | disable_nonboot_cpus(); | ||
881 | sysdev_shutdown(); | 883 | sysdev_shutdown(); |
882 | printk(KERN_EMERG "Power down.\n"); | 884 | printk(KERN_EMERG "Power down.\n"); |
883 | machine_power_off(); | 885 | machine_power_off(); |
@@ -1442,7 +1444,6 @@ asmlinkage long sys_times(struct tms __user * tbuf) | |||
1442 | * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. | 1444 | * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. |
1443 | * LBT 04.03.94 | 1445 | * LBT 04.03.94 |
1444 | */ | 1446 | */ |
1445 | |||
1446 | asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) | 1447 | asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) |
1447 | { | 1448 | { |
1448 | struct task_struct *p; | 1449 | struct task_struct *p; |
@@ -1470,7 +1471,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) | |||
1470 | if (!thread_group_leader(p)) | 1471 | if (!thread_group_leader(p)) |
1471 | goto out; | 1472 | goto out; |
1472 | 1473 | ||
1473 | if (p->real_parent == group_leader) { | 1474 | if (p->real_parent->tgid == group_leader->tgid) { |
1474 | err = -EPERM; | 1475 | err = -EPERM; |
1475 | if (task_session(p) != task_session(group_leader)) | 1476 | if (task_session(p) != task_session(group_leader)) |
1476 | goto out; | 1477 | goto out; |