summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2014-12-01 18:05:35 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-12-08 09:42:35 +0100
commit4b4ee3ee0beb4f39efe5eb9581f07bddc4201240 (patch)
tree97498f0f0b3521e91cd90f02bf5ea6efb436b861
parent8461b63ca01d125a245a0d0fb4821ea0656e5053 (diff)
downloadlinux-4b4ee3ee0beb4f39efe5eb9581f07bddc4201240.tar.gz
linux-4b4ee3ee0beb4f39efe5eb9581f07bddc4201240.tar.bz2
linux-4b4ee3ee0beb4f39efe5eb9581f07bddc4201240.zip
s390/simd: clear vector register pointer on fork/clone
The copy_thread function fails to reset the p->thread.vxrs pointer. This causes the child to use the same vector register save area, causing both data corruptions and multiple frees of the memory for the save area after the tasks sharing the save area terminate. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/process.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 4192dfd55ddc..aa7a83948c7b 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -153,6 +153,7 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
save_fp_ctl(&p->thread.fp_regs.fpc);
save_fp_regs(p->thread.fp_regs.fprs);
p->thread.fp_regs.pad = 0;
+ p->thread.vxrs = NULL;
/* Set a new TLS ? */
if (clone_flags & CLONE_SETTLS) {
unsigned long tls = frame->childregs.gprs[6];