alistair23-linux/arch/mips
Vegard Nossum b0f5a8f32e kthread: fix boot hang (regression) on MIPS/OpenRISC
This fixes a regression in commit 4d6501dce0 where I didn't notice
that MIPS and OpenRISC were reinitialising p->{set,clear}_child_tid to
NULL after our initialisation in copy_process().

We can simply get rid of the arch-specific initialisation here since it
is now always done in copy_process() before hitting copy_thread{,_tls}().

Review notes:

 - As far as I can tell, copy_process() is the only user of
   copy_thread_tls(), which is the only caller of copy_thread() for
   architectures that don't implement copy_thread_tls().

 - After this patch, there is no arch-specific code touching
   p->set_child_tid or p->clear_child_tid whatsoever.

 - It may look like MIPS/OpenRISC wanted to always have these fields be
   NULL, but that's not true, as copy_process() would unconditionally
   set them again _after_ calling copy_thread_tls() before commit
   4d6501dce0.

Fixes: 4d6501dce0 ("kthread: Fix use-after-free if kthread fork fails")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net> # MIPS only
Acked-by: Stafford Horne <shorne@gmail.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: openrisc@lists.librecores.org
Cc: Jamie Iles <jamie.iles@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-05-29 09:40:54 -07:00
..
alchemy MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
ar7
ath25
ath79
bcm47xx
bcm63xx
bmips
boot devicetree: Move include prefixes from arch to separate directory 2017-05-18 23:55:48 -07:00
cavium-octeon Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
cobalt
configs Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
dec format-security: move static strings to const 2017-05-08 17:15:14 -07:00
emma
fw
generic
include Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
jazz
jz4740 MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
kernel kthread: fix boot hang (regression) on MIPS/OpenRISC 2017-05-29 09:40:54 -07:00
kvm KVM: add kvm_{test,clear}_request to replace {test,clear}_bit 2017-04-27 14:12:22 +02:00
lantiq MIPS: smp-mt: Use CPU interrupt controller IPI IRQ domain support 2017-04-12 23:13:13 +02:00
lasat
lib
loongson32 MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
loongson64 MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
math-emu MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling 2017-04-10 11:56:09 +02:00
mm Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
mti-malta Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
net MIPS: BPF: Fix multiple problems in JIT skb access helpers. 2017-04-10 11:56:05 +02:00
netlogic
oprofile
paravirt
pci Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 16:15:18 -07:00
rb532
sgi-ip22
sgi-ip27 MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
sgi-ip32
sibyte MIPS: Sibyte: Export symbol periph_rev to sb1250-mac network driver. 2017-04-21 03:23:24 +02:00
sni
txx9
vdso
vr41xx
xilfpga
Kbuild MIPS: Disable Werror when W= is set 2017-04-10 11:56:07 +02:00
Kbuild.platforms
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-05-12 09:56:30 -07:00
Kconfig.debug MIPS: Sibyte: Fix Kconfig warning. 2017-04-21 03:34:01 +02:00
Makefile MIPS: generic: fix out-of-tree defconfig target builds 2017-04-11 13:17:31 +02:00
Makefile.postlink