From: <gregkh@linuxfoundation.org>
To: amit.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
Cc: <stable-commits@vger.kernel.org>
Subject: Patch "kthread: fix boot hang (regression) on MIPS/OpenRISC" has been added to the 4.9-stable tree
Date: Sun, 16 Sep 2018 15:40:38 +0200 [thread overview]
Message-ID: <153710523813649@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
kthread: fix boot hang (regression) on MIPS/OpenRISC
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kthread-fix-boot-hang-regression-on-mips-openrisc.patch
and it can be found in the queue-4.9 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.
WARNING: multiple messages have this Message-ID (diff)
From: <gregkh@linuxfoundation.org>
To: amit.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
Cc: stable-commits@vger.kernel.org
Subject: Patch "kthread: fix boot hang (regression) on MIPS/OpenRISC" has been added to the 4.9-stable tree
Date: Sun, 16 Sep 2018 15:40:38 +0200 [thread overview]
Message-ID: <153710523813649@kroah.com> (raw)
Message-ID: <20180916134038.98xqrfaqHzuXqRxkY3024hPhchjg_pmXmJhzqgJb4ZM@z> (raw)
This is a note to let you know that I've just added the patch titled
kthread: fix boot hang (regression) on MIPS/OpenRISC
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kthread-fix-boot-hang-regression-on-mips-openrisc.patch
and it can be found in the queue-4.9 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.
WARNING: multiple messages have this Message-ID (diff)
From: gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] Patch "kthread: fix boot hang (regression) on MIPS/OpenRISC" has been added to the 4.9-stable tree
Date: Sun, 16 Sep 2018 15:40:38 +0200 [thread overview]
Message-ID: <153710523813649@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
kthread: fix boot hang (regression) on MIPS/OpenRISC
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kthread-fix-boot-hang-regression-on-mips-openrisc.patch
and it can be found in the queue-4.9 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
@@ -118,7 +118,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.9/kthread-fix-use-after-free-if-kthread-fork-fails.patch
queue-4.9/kthread-fix-boot-hang-regression-on-mips-openrisc.patch
next reply other threads:[~2018-09-16 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-16 13:40 gregkh [this message]
2018-09-16 13:40 ` [OpenRISC] Patch "kthread: fix boot hang (regression) on MIPS/OpenRISC" has been added to the 4.9-stable tree gregkh
2018-09-16 13:40 ` gregkh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=153710523813649@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=amit.pundir@linaro.org \
--cc=jamie.iles@oracle.com \
--cc=jonas@southpole.se \
--cc=linux-mips@linux-mips.org \
--cc=linux@roeck-us.net \
--cc=oleg@redhat.com \
--cc=openrisc@lists.librecores.org \
--cc=ralf@linux-mips.org \
--cc=shorne@gmail.com \
--cc=stable-commits@vger.kernel.org \
--cc=stefan.kristiansson@saunalahti.fi \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vegard.nossum@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.