aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2017-06-01 13:53:55 -0400
committerBrian Norris <computersforpeace@gmail.com>2017-06-01 13:53:55 -0400
commit05e97a9eda72d58dba293857df6aac62584ef99a (patch)
treee86e692f26d4879ff2210c54722e2b7780210249 /kernel/fork.c
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
parentd4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff)
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris: """ This pull request contains several fixes to the core and the tango driver. tango fixes: * Add missing MODULE_DEVICE_TABLE() in tango_nand.c * Update the number of corrected bitflips core fixes: * Fix a long standing memory leak in nand_scan_tail() * Fix several bugs introduced by the per-vendor init/detection infrastructure (introduced in 4.12) * Add a static specifier to nand_ooblayout_lp_hamming_ops definition """
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 06d759ab4c62..aa1076c5e4a9 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1845,11 +1845,13 @@ static __latent_entropy struct task_struct *copy_process(
1845 */ 1845 */
1846 recalc_sigpending(); 1846 recalc_sigpending();
1847 if (signal_pending(current)) { 1847 if (signal_pending(current)) {
1848 spin_unlock(&current->sighand->siglock);
1849 write_unlock_irq(&tasklist_lock);
1850 retval = -ERESTARTNOINTR; 1848 retval = -ERESTARTNOINTR;
1851 goto bad_fork_cancel_cgroup; 1849 goto bad_fork_cancel_cgroup;
1852 } 1850 }
1851 if (unlikely(!(ns_of_pid(pid)->nr_hashed & PIDNS_HASH_ADDING))) {
1852 retval = -ENOMEM;
1853 goto bad_fork_cancel_cgroup;
1854 }
1853 1855
1854 if (likely(p->pid)) { 1856 if (likely(p->pid)) {
1855 ptrace_init_task(p, (clone_flags & CLONE_PTRACE) || trace); 1857 ptrace_init_task(p, (clone_flags & CLONE_PTRACE) || trace);
@@ -1907,6 +1909,8 @@ static __latent_entropy struct task_struct *copy_process(
1907 return p; 1909 return p;
1908 1910
1909bad_fork_cancel_cgroup: 1911bad_fork_cancel_cgroup:
1912 spin_unlock(&current->sighand->siglock);
1913 write_unlock_irq(&tasklist_lock);
1910 cgroup_cancel_fork(p); 1914 cgroup_cancel_fork(p);
1911bad_fork_free_pid: 1915bad_fork_free_pid:
1912 cgroup_threadgroup_change_end(current); 1916 cgroup_threadgroup_change_end(current);