linux/arch
Haren Myneni 7fad97798d powerpc/powernv/vas: Release reference to tgid during window close
commit 91cdbb955a upstream.

The kernel handles the NX fault by updating CSB or sending
signal to process. In multithread applications, children can
open VAS windows and can exit without closing them. But the
parent can continue to send NX requests with these windows. To
prevent pid reuse, reference will be taken on pid and tgid
when the window is opened and release them during window close.

The current code is not releasing the tgid reference which can
cause pid leak and this patch fixes the issue.

Fixes: db1c08a740 ("powerpc/vas: Take reference to PID and mm for user space windows")
Cc: stable@vger.kernel.org # 5.8+
Reported-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/6020fc4d444864fe20f7dcdc5edfe53e67480a1c.camel@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2021-07-19 10:04:47 +02:00
..
alpha net: retrieve netns cookie via getsocketopt 2021-07-19 10:04:44 +02:00
arc sched/core: Initialize the idle task with preemption disabled 2021-07-14 17:06:21 +02:00
arm sched/core: Initialize the idle task with preemption disabled 2021-07-14 17:06:21 +02:00
arm64 arm64: dts: marvell: armada-37xx: Fix reg for standard variant of UART 2021-07-14 17:07:46 +02:00
csky csky: syscache: Fixup duplicate cache flush 2021-07-14 17:07:48 +02:00
h8300 arch: rearrange headers inclusion order in asm/bitops for m68k, sh and h8300 2021-05-06 19:24:11 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2021-05-07 00:34:51 -07:00
ia64 ia64: mca_drv: fix incorrect array size calculation 2021-07-14 17:06:38 +02:00
m68k m68k: atari: Fix ATARI_KBD_CORE kconfig unmet dependency warning 2021-07-14 17:06:43 +02:00
microblaze quota: Disable quotactl_path syscall 2021-05-17 14:39:56 +02:00
mips MIPS: MT extensions are not available on MIPS32r1 2021-07-19 10:04:47 +02:00
nds32 tracing updates for 5.13 2021-05-03 11:19:54 -07:00
nios2 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-05-02 09:14:01 -07:00
openrisc sched/core: Initialize the idle task with preemption disabled 2021-07-14 17:06:21 +02:00
parisc net: retrieve netns cookie via getsocketopt 2021-07-19 10:04:44 +02:00
powerpc powerpc/powernv/vas: Release reference to tgid during window close 2021-07-19 10:04:47 +02:00
riscv sched/core: Initialize the idle task with preemption disabled 2021-07-14 17:06:21 +02:00
s390 s390: preempt: Fix preempt_count initialization 2021-07-14 17:07:51 +02:00
sh sched/core: Initialize the idle task with preemption disabled 2021-07-14 17:06:21 +02:00
sparc net: retrieve netns cookie via getsocketopt 2021-07-19 10:04:44 +02:00
um Merge branch 'akpm' (patches from Andrew) 2021-05-07 00:34:51 -07:00
x86 bpf, x86: Fix extable offset calculation 2021-07-14 17:07:23 +02:00
xtensa sched/core: Initialize the idle task with preemption disabled 2021-07-14 17:06:21 +02:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Add Landlock, a new LSM from Mickaël Salaün <mic@linux.microsoft.com> 2021-05-01 18:50:44 -07:00