diff for duplicates of <1537105219230145@kroah.com> diff --git a/a/content_digest b/N1/content_digest index fa2aabd..054fdd8 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -15,7 +15,7 @@ tglx@linutronix.de torvalds@linux-foundation.org " vegard.nossum@oracle.com\0" - "Cc\0<stable-commits@vger.kernel.org>\0" + "Cc\0stable-commits@vger.kernel.org\0" "\00:1\0" "b\0" "\n" @@ -33,4 +33,4 @@ "If you, or anyone else, feels it should not be added to the stable tree,\n" please let <stable@vger.kernel.org> know about it. -fadb1f9d1569446a0a772a1e74249823507bab111152c1b13aaf963034f9e5ac +dc501fe043d8bf8418565acee06f53cae9af91acf22a75b749b6182d8c749473
diff --git a/a/1.txt b/N2/1.txt index d51e74d..e9772c0 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -12,3 +12,84 @@ and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@vger.kernel.org> know about it. + + +From b0f5a8f32e8bbdaae1abb8abe2d3cbafaba57e08 Mon Sep 17 00:00:00 2001 +From: Vegard Nossum <vegard.nossum@oracle.com> +Date: Mon, 29 May 2017 09:22:07 +0200 +Subject: kthread: fix boot hang (regression) on MIPS/OpenRISC + +From: Vegard Nossum <vegard.nossum@oracle.com> + +commit b0f5a8f32e8bbdaae1abb8abe2d3cbafaba57e08 upstream. + +This fixes a regression in commit 4d6501dce079 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 + 4d6501dce079. + +Fixes: 4d6501dce079c1eb6bf0b1d8f528a5e81770109e ("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 at linux-mips.org +Cc: Jonas Bonn <jonas@southpole.se> +Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> +Cc: openrisc at 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> +Signed-off-by: Amit Pundir <amit.pundir@linaro.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + +--- + arch/mips/kernel/process.c | 1 - + arch/openrisc/kernel/process.c | 2 -- + 2 files changed, 3 deletions(-) + +--- a/arch/mips/kernel/process.c ++++ b/arch/mips/kernel/process.c +@@ -115,7 +115,6 @@ int copy_thread(unsigned long clone_flag + struct thread_info *ti = task_thread_info(p); + struct pt_regs *childregs, *regs = current_pt_regs(); + unsigned long childksp; +- p->set_child_tid = p->clear_child_tid = NULL; + + childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32; + +--- a/arch/openrisc/kernel/process.c ++++ b/arch/openrisc/kernel/process.c +@@ -152,8 +152,6 @@ copy_thread(unsigned long clone_flags, u + + top_of_kernel_stack = sp; + +- p->set_child_tid = p->clear_child_tid = NULL; +- + /* Locate userspace context on stack... */ + sp -= STACK_FRAME_OVERHEAD; /* redzone */ + sp -= sizeof(struct pt_regs); + + +Patches currently in stable-queue which might be from vegard.nossum at oracle.com are + +queue-4.4/kthread-fix-use-after-free-if-kthread-fork-fails.patch +queue-4.4/kthread-fix-boot-hang-regression-on-mips-openrisc.patch diff --git a/a/content_digest b/N2/content_digest index fa2aabd..4f36138 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,21 +1,7 @@ - "From\0<gregkh@linuxfoundation.org>\0" - "Subject\0Patch \"kthread: fix boot hang (regression) on MIPS/OpenRISC\" has been added to the 4.4-stable tree\0" + "From\0gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>\0" + "Subject\0[OpenRISC] Patch \"kthread: fix boot hang (regression) on MIPS/OpenRISC\" has been added to the 4.4-stable tree\0" "Date\0Sun, 16 Sep 2018 15:40:19 +0200\0" - "To\0amit.pundir@linaro.org" - gregkh@linuxfoundation.org - jamie.iles@oracle.com - jonas@southpole.se - linux-mips@linux-mips.org - linux@roeck-us.net - oleg@redhat.com - openrisc@lists.librecores.org - ralf@linux-mips.org - shorne@gmail.com - stefan.kristiansson@saunalahti.fi - tglx@linutronix.de - torvalds@linux-foundation.org - " vegard.nossum@oracle.com\0" - "Cc\0<stable-commits@vger.kernel.org>\0" + "To\0openrisc@lists.librecores.org\0" "\00:1\0" "b\0" "\n" @@ -31,6 +17,87 @@ "and it can be found in the queue-4.4 subdirectory.\n" "\n" "If you, or anyone else, feels it should not be added to the stable tree,\n" - please let <stable@vger.kernel.org> know about it. + "please let <stable@vger.kernel.org> know about it.\n" + "\n" + "\n" + "From b0f5a8f32e8bbdaae1abb8abe2d3cbafaba57e08 Mon Sep 17 00:00:00 2001\n" + "From: Vegard Nossum <vegard.nossum@oracle.com>\n" + "Date: Mon, 29 May 2017 09:22:07 +0200\n" + "Subject: kthread: fix boot hang (regression) on MIPS/OpenRISC\n" + "\n" + "From: Vegard Nossum <vegard.nossum@oracle.com>\n" + "\n" + "commit b0f5a8f32e8bbdaae1abb8abe2d3cbafaba57e08 upstream.\n" + "\n" + "This fixes a regression in commit 4d6501dce079 where I didn't notice\n" + "that MIPS and OpenRISC were reinitialising p->{set,clear}_child_tid to\n" + "NULL after our initialisation in copy_process().\n" + "\n" + "We can simply get rid of the arch-specific initialisation here since it\n" + "is now always done in copy_process() before hitting copy_thread{,_tls}().\n" + "\n" + "Review notes:\n" + "\n" + " - As far as I can tell, copy_process() is the only user of\n" + " copy_thread_tls(), which is the only caller of copy_thread() for\n" + " architectures that don't implement copy_thread_tls().\n" + "\n" + " - After this patch, there is no arch-specific code touching\n" + " p->set_child_tid or p->clear_child_tid whatsoever.\n" + "\n" + " - It may look like MIPS/OpenRISC wanted to always have these fields be\n" + " NULL, but that's not true, as copy_process() would unconditionally\n" + " set them again _after_ calling copy_thread_tls() before commit\n" + " 4d6501dce079.\n" + "\n" + "Fixes: 4d6501dce079c1eb6bf0b1d8f528a5e81770109e (\"kthread: Fix use-after-free if kthread fork fails\")\n" + "Reported-by: Guenter Roeck <linux@roeck-us.net>\n" + "Tested-by: Guenter Roeck <linux@roeck-us.net> # MIPS only\n" + "Acked-by: Stafford Horne <shorne@gmail.com>\n" + "Acked-by: Oleg Nesterov <oleg@redhat.com>\n" + "Cc: Ralf Baechle <ralf@linux-mips.org>\n" + "Cc: linux-mips at linux-mips.org\n" + "Cc: Jonas Bonn <jonas@southpole.se>\n" + "Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>\n" + "Cc: openrisc at lists.librecores.org\n" + "Cc: Jamie Iles <jamie.iles@oracle.com>\n" + "Cc: Thomas Gleixner <tglx@linutronix.de>\n" + "Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>\n" + "Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n" + "Signed-off-by: Amit Pundir <amit.pundir@linaro.org>\n" + "Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\n" + "\n" + "---\n" + " arch/mips/kernel/process.c | 1 -\n" + " arch/openrisc/kernel/process.c | 2 --\n" + " 2 files changed, 3 deletions(-)\n" + "\n" + "--- a/arch/mips/kernel/process.c\n" + "+++ b/arch/mips/kernel/process.c\n" + "@@ -115,7 +115,6 @@ int copy_thread(unsigned long clone_flag\n" + " \tstruct thread_info *ti = task_thread_info(p);\n" + " \tstruct pt_regs *childregs, *regs = current_pt_regs();\n" + " \tunsigned long childksp;\n" + "-\tp->set_child_tid = p->clear_child_tid = NULL;\n" + " \n" + " \tchildksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32;\n" + " \n" + "--- a/arch/openrisc/kernel/process.c\n" + "+++ b/arch/openrisc/kernel/process.c\n" + "@@ -152,8 +152,6 @@ copy_thread(unsigned long clone_flags, u\n" + " \n" + " \ttop_of_kernel_stack = sp;\n" + " \n" + "-\tp->set_child_tid = p->clear_child_tid = NULL;\n" + "-\n" + " \t/* Locate userspace context on stack... */\n" + " \tsp -= STACK_FRAME_OVERHEAD;\t/* redzone */\n" + " \tsp -= sizeof(struct pt_regs);\n" + "\n" + "\n" + "Patches currently in stable-queue which might be from vegard.nossum at oracle.com are\n" + "\n" + "queue-4.4/kthread-fix-use-after-free-if-kthread-fork-fails.patch\n" + queue-4.4/kthread-fix-boot-hang-regression-on-mips-openrisc.patch -fadb1f9d1569446a0a772a1e74249823507bab111152c1b13aaf963034f9e5ac +71f7c6caaa4ec2b92c461d314c9a5d40f9a3a7a86463f1291fd5df26e0d943be
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.