diff --git a/kernel/sys.c b/kernel/sys.c index 56d01152867..a6105532d07 100755 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -656,6 +656,7 @@ static int set_user(struct cred *new) free_uid(new->user); new->user = new_user; + sched_autogroup_create_attach(current); return 0; } @@ -1165,7 +1166,7 @@ SYSCALL_DEFINE0(setsid) write_unlock_irq(&tasklist_lock); if (err > 0) { proc_sid_connector(group_leader); - sched_autogroup_create_attach(group_leader); + } return err; } diff --git a/kernel/sysctl.c b/kernel/sysctl.c index e028c843a85..b23667f076c 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -376,7 +376,7 @@ static struct ctl_table kern_table[] = { .data = &sysctl_sched_autogroup_enabled, .maxlen = sizeof(unsigned int), .mode = 0644, - .proc_handler = proc_dointvec_minmax, + .proc_handler = proc_dointvec, .extra1 = &zero, .extra2 = &one, },