From: <gregkh@linuxfoundation.org>
To: tglx@linutronix.de, gregkh@linuxfoundation.org,
torvalds@linux-foundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "smp/hotplug: Replace BUG_ON and react useful" has been added to the 4.12-stable tree
Date: Tue, 25 Jul 2017 11:05:39 -0700 [thread overview]
Message-ID: <150100593912554@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
smp/hotplug: Replace BUG_ON and react useful
to the 4.12-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:
smp-hotplug-replace-bug_on-and-react-useful.patch
and it can be found in the queue-4.12 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 dea1d0f5f1284e3defee4b8484d9fc230686cd42 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 11 Jul 2017 22:06:24 +0200
Subject: smp/hotplug: Replace BUG_ON and react useful
From: Thomas Gleixner <tglx@linutronix.de>
commit dea1d0f5f1284e3defee4b8484d9fc230686cd42 upstream.
The move of the unpark functions to the control thread moved the BUG_ON()
there as well. While it made some sense in the idle thread of the upcoming
CPU, it's bogus to crash the control thread on the already online CPU,
especially as the function has a return value and the callsite is prepared
to handle an error return.
Replace it with a WARN_ON_ONCE() and return a proper error code.
Fixes: 9cd4f1a4e7a8 ("smp/hotplug: Move unparking of percpu threads to the control CPU")
Rightfully-ranted-at-by: Linux Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -354,7 +354,8 @@ static int bringup_wait_for_ap(unsigned
/* Wait for the CPU to reach CPUHP_AP_ONLINE_IDLE */
wait_for_completion(&st->done);
- BUG_ON(!cpu_online(cpu));
+ if (WARN_ON_ONCE((!cpu_online(cpu))))
+ return -ECANCELED;
/* Unpark the stopper thread and the hotplug thread of the target cpu */
stop_machine_unpark(cpu);
Patches currently in stable-queue which might be from tglx@linutronix.de are
queue-4.12/sched-cputime-rename-vtime-fields.patch
queue-4.12/vtime-sched-cputime-remove-vtime_account_user.patch
queue-4.12/x86-ioapic-pass-the-correct-data-to-unmask_ioapic_irq.patch
queue-4.12/smp-hotplug-move-unparking-of-percpu-threads-to-the-control-cpu.patch
queue-4.12/perf-core-fix-scheduling-regression-of-pinned-groups.patch
queue-4.12/smp-hotplug-replace-bug_on-and-react-useful.patch
queue-4.12/x86-acpi-prevent-out-of-bound-access-caused-by-broken-acpi-tables.patch
queue-4.12/sched-fair-fix-load_balance-affinity-redo-path.patch
queue-4.12/sched-cputime-accumulate-vtime-on-top-of-nsec-clocksource.patch
queue-4.12/sched-cputime-move-the-vtime-task-fields-to-their-own-struct.patch
queue-4.12/sched-cputime-always-set-tsk-vtime_snap_whence-after-accounting-vtime.patch
reply other threads:[~2017-07-25 18:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=150100593912554@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).