aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c21
-rw-r--r--kernel/sysctl.c4
-rw-r--r--kernel/sysctl_check.c2
3 files changed, 11 insertions, 16 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 8ca1a14cdc8c..8dd8ff281009 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1292,23 +1292,14 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1292 __ptrace_link(p, current->parent); 1292 __ptrace_link(p, current->parent);
1293 1293
1294 if (thread_group_leader(p)) { 1294 if (thread_group_leader(p)) {
1295 if (clone_flags & CLONE_NEWPID) { 1295 if (clone_flags & CLONE_NEWPID)
1296 p->nsproxy->pid_ns->child_reaper = p; 1296 p->nsproxy->pid_ns->child_reaper = p;
1297 p->signal->tty = NULL;
1298 set_task_pgrp(p, p->pid);
1299 set_task_session(p, p->pid);
1300 attach_pid(p, PIDTYPE_PGID, pid);
1301 attach_pid(p, PIDTYPE_SID, pid);
1302 } else {
1303 p->signal->tty = current->signal->tty;
1304 set_task_pgrp(p, task_pgrp_nr(current));
1305 set_task_session(p, task_session_nr(current));
1306 attach_pid(p, PIDTYPE_PGID,
1307 task_pgrp(current));
1308 attach_pid(p, PIDTYPE_SID,
1309 task_session(current));
1310 }
1311 1297
1298 p->signal->tty = current->signal->tty;
1299 set_task_pgrp(p, task_pgrp_nr(current));
1300 set_task_session(p, task_session_nr(current));
1301 attach_pid(p, PIDTYPE_PGID, task_pgrp(current));
1302 attach_pid(p, PIDTYPE_SID, task_session(current));
1312 list_add_tail_rcu(&p->tasks, &init_task.tasks); 1303 list_add_tail_rcu(&p->tasks, &init_task.tasks);
1313 __get_cpu_var(process_counts)++; 1304 __get_cpu_var(process_counts)++;
1314 } 1305 }
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 0deed82a6156..8ac51714b08c 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1588,6 +1588,10 @@ struct ctl_table_header *register_sysctl_table(struct ctl_table * table)
1588void unregister_sysctl_table(struct ctl_table_header * header) 1588void unregister_sysctl_table(struct ctl_table_header * header)
1589{ 1589{
1590 might_sleep(); 1590 might_sleep();
1591
1592 if (header == NULL)
1593 return;
1594
1591 spin_lock(&sysctl_lock); 1595 spin_lock(&sysctl_lock);
1592 start_unregistering(header); 1596 start_unregistering(header);
1593 spin_unlock(&sysctl_lock); 1597 spin_unlock(&sysctl_lock);
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c
index 6972f26c65f7..bed939f82c31 100644
--- a/kernel/sysctl_check.c
+++ b/kernel/sysctl_check.c
@@ -96,7 +96,7 @@ static struct trans_ctl_table trans_kern_table[] = {
96 96
97 { KERN_PTY, "pty", trans_pty_table }, 97 { KERN_PTY, "pty", trans_pty_table },
98 { KERN_NGROUPS_MAX, "ngroups_max" }, 98 { KERN_NGROUPS_MAX, "ngroups_max" },
99 { KERN_SPARC_SCONS_PWROFF, "scons_poweroff" }, 99 { KERN_SPARC_SCONS_PWROFF, "scons-poweroff" },
100 { KERN_HZ_TIMER, "hz_timer" }, 100 { KERN_HZ_TIMER, "hz_timer" },
101 { KERN_UNKNOWN_NMI_PANIC, "unknown_nmi_panic" }, 101 { KERN_UNKNOWN_NMI_PANIC, "unknown_nmi_panic" },
102 { KERN_BOOTLOADER_TYPE, "bootloader_type" }, 102 { KERN_BOOTLOADER_TYPE, "bootloader_type" },