From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Vitaliy Fillipov <vitalif@yourcmc.ru>,
Ben Hutchings <ben@decadent.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
700333@bugs.debian.org
Subject: [ 44/63] clockevents: Set dummy handler on CPU_DEAD shutdown
Date: Mon, 6 May 2013 15:56:22 -0700 [thread overview]
Message-ID: <20130506225325.499699191@linuxfoundation.org> (raw)
In-Reply-To: <20130506225314.802167948@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 6f7a05d7018de222e40ca003721037a530979974 upstream.
Vitaliy reported that a per cpu HPET timer interrupt crashes the
system during hibernation. What happens is that the per cpu HPET timer
gets shut down when the nonboot cpus are stopped. When the nonboot
cpus are onlined again the HPET code sets up the MSI interrupt which
fires before the clock event device is registered. The event handler
is still set to hrtimer_interrupt, which then crashes the machine due
to highres mode not being active.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700333
There is no real good way to avoid that in the HPET code. The HPET
code alrady has a mechanism to detect spurious interrupts when event
handler == NULL for a similar reason.
We can handle that in the clockevent/tick layer and replace the
previous functional handler with a dummy handler like we do in
tick_setup_new_device().
The original clockevents code did this in clockevents_exchange_device(),
but that got removed by commit 7c1e76897 (clockevents: prevent
clockevent event_handler ending up handler_noop) which forgot to fix
it up in tick_shutdown(). Same issue with the broadcast device.
Reported-by: Vitaliy Fillipov <vitalif@yourcmc.ru>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: 700333@bugs.debian.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/time/tick-broadcast.c | 4 ++++
kernel/time/tick-common.c | 1 +
2 files changed, 5 insertions(+)
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -66,6 +66,8 @@ static void tick_broadcast_start_periodi
*/
int tick_check_broadcast_device(struct clock_event_device *dev)
{
+ struct clock_event_device *cur = tick_broadcast_device.evtdev;
+
if ((dev->features & CLOCK_EVT_FEAT_DUMMY) ||
(tick_broadcast_device.evtdev &&
tick_broadcast_device.evtdev->rating >= dev->rating) ||
@@ -73,6 +75,8 @@ int tick_check_broadcast_device(struct c
return 0;
clockevents_exchange_device(tick_broadcast_device.evtdev, dev);
+ if (cur)
+ cur->event_handler = clockevents_handle_noop;
tick_broadcast_device.evtdev = dev;
if (!cpumask_empty(tick_get_broadcast_mask()))
tick_broadcast_start_periodic(dev);
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -323,6 +323,7 @@ static void tick_shutdown(unsigned int *
*/
dev->mode = CLOCK_EVT_MODE_UNUSED;
clockevents_exchange_device(dev, NULL);
+ dev->event_handler = clockevents_handle_noop;
td->evtdev = NULL;
}
raw_spin_unlock_irqrestore(&tick_device_lock, flags);
next prev parent reply other threads:[~2013-05-06 22:57 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 22:55 [ 00/63] 3.4.44-stable review Greg Kroah-Hartman
2013-05-06 22:55 ` [ 01/63] USB: serial: option: Added support Olivetti Olicard 145 Greg Kroah-Hartman
2013-05-06 22:55 ` [ 02/63] USB: option: add a D-Link DWM-156 variant Greg Kroah-Hartman
2013-05-06 22:55 ` [ 03/63] ARM: at91: Fix typo in restart code panic message Greg Kroah-Hartman
2013-05-06 22:55 ` [ 04/63] powerpc: Add isync to copy_and_flush Greg Kroah-Hartman
2013-05-06 22:55 ` [ 05/63] powerpc/spufs: Initialise inode->i_ino in spufs_new_inode() Greg Kroah-Hartman
2013-05-06 22:55 ` [ 06/63] mwifiex: Use pci_release_region() instead of a pci_release_regions() Greg Kroah-Hartman
2013-05-06 22:55 ` [ 07/63] mwifiex: Call pci_release_region after calling pci_disable_device Greg Kroah-Hartman
2013-05-06 22:55 ` [ 08/63] usb/misc/appledisplay: Add 24" LED Cinema display Greg Kroah-Hartman
2013-05-06 22:55 ` [ 09/63] USB: add ftdi_sio USB ID for GDM Boost V1.x Greg Kroah-Hartman
2013-05-06 22:55 ` [ 10/63] USB: ftdi_sio: correct ST Micro Connect Lite PIDs Greg Kroah-Hartman
2013-05-06 22:55 ` [ 11/63] usbfs: Always allow ctrl requests with USB_RECIP_ENDPOINT on the ctrl ep Greg Kroah-Hartman
2013-05-06 22:55 ` [ 12/63] usb-storage: CY7C68300A chips do not support Cypress ATACB Greg Kroah-Hartman
2013-05-06 22:55 ` [ 13/63] s390/memory hotplug: prevent offline of active memory increments Greg Kroah-Hartman
2013-05-06 22:55 ` [ 14/63] xen/time: Fix kasprintf splat when allocating timer%d IRQ line Greg Kroah-Hartman
2013-05-06 22:55 ` [ 15/63] serial_core.c: add put_device() after device_find_child() Greg Kroah-Hartman
2013-05-06 22:55 ` [ 16/63] arm: set the page table freeing ceiling to TASK_SIZE Greg Kroah-Hartman
2013-05-06 22:55 ` [ 17/63] gianfar: do not advertise any alarm capability Greg Kroah-Hartman
2013-05-06 22:55 ` [ 18/63] tty: fix up atime/mtime mess, take three Greg Kroah-Hartman
2013-05-06 22:55 ` [ 19/63] fbcon: when font is freed, clear also vc_font.data Greg Kroah-Hartman
2013-05-06 22:55 ` [ 20/63] tracing: Use stack of calling function for stack tracer Greg Kroah-Hartman
2013-05-06 22:55 ` [ 21/63] tracing: Fix stack tracer with fentry use Greg Kroah-Hartman
2013-05-06 22:56 ` [ 22/63] tracing: Remove most or all of stack tracer stack size from stack_max_size Greg Kroah-Hartman
2013-05-06 22:56 ` [ 23/63] tracing: Fix off-by-one on allocating stat->pages Greg Kroah-Hartman
2013-05-06 22:56 ` [ 24/63] tracing: Check return value of tracing_init_dentry() Greg Kroah-Hartman
2013-05-06 22:56 ` [ 25/63] tracing: Reset ftrace_graph_filter_enabled if count is zero Greg Kroah-Hartman
2013-05-06 22:56 ` [ 26/63] i2c: xiic: must always write 16-bit words to TX_FIFO Greg Kroah-Hartman
2013-05-06 22:56 ` [ 27/63] sysfs: fix use after free in case of concurrent read/write and readdir Greg Kroah-Hartman
2013-05-06 22:56 ` [ 28/63] Fix initialization of CMCI/CMCP interrupts Greg Kroah-Hartman
2013-05-06 22:56 ` [ 29/63] PCI / ACPI: Dont query OSC support with all possible controls Greg Kroah-Hartman
2013-05-06 22:56 ` [ 30/63] PCI/PM: Fix fallback to PCI_D0 in pci_platform_power_transition() Greg Kroah-Hartman
2013-05-06 22:56 ` [ 31/63] Wrong asm register contraints in the futex implementation Greg Kroah-Hartman
2013-05-06 22:56 ` [ 32/63] Wrong asm register contraints in the kvm implementation Greg Kroah-Hartman
2013-05-06 22:56 ` [ 33/63] fs/fscache/stats.c: fix memory leak Greg Kroah-Hartman
2013-05-06 22:56 ` [ 34/63] mm: allow arch code to control the user page table ceiling Greg Kroah-Hartman
2013-05-06 22:56 ` [ 35/63] ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT Greg Kroah-Hartman
2013-05-06 22:56 ` [ 36/63] ALSA: usb-audio: disable autopm for MIDI devices Greg Kroah-Hartman
2013-05-06 22:56 ` [ 37/63] ALSA: usb-audio: Fix autopm error during probing Greg Kroah-Hartman
2013-05-06 22:56 ` [ 38/63] ARM: 7702/1: Set the page table freeing ceiling to TASK_SIZE Greg Kroah-Hartman
2013-05-06 22:56 ` [ 39/63] ASoC: max98088: Fix logging of hardware revision Greg Kroah-Hartman
2013-05-06 22:56 ` [ 40/63] hrtimer: Fix ktime_add_ns() overflow on 32bit architectures Greg Kroah-Hartman
2013-05-06 22:56 ` [ 41/63] hrtimer: Add expiry time overflow check in hrtimer_interrupt Greg Kroah-Hartman
2013-05-06 22:56 ` [ 42/63] drivers/rtc/rtc-cmos.c: dont disable hpet emulation on suspend Greg Kroah-Hartman
2013-05-06 22:56 ` [ 43/63] cgroup: fix an off-by-one bug which may trigger BUG_ON() Greg Kroah-Hartman
2013-05-06 22:56 ` Greg Kroah-Hartman [this message]
2013-05-06 22:56 ` [ 45/63] fs/dcache.c: add cond_resched() to shrink_dcache_parent() Greg Kroah-Hartman
2013-05-06 22:56 ` [ 46/63] LOCKD: Ensure that nlmclnt_block resets block->b_status after a server reboot Greg Kroah-Hartman
2013-05-06 22:56 ` [ 47/63] md: bad block list should default to disabled Greg Kroah-Hartman
2013-05-06 22:56 ` [ 48/63] NFSv4: Handle NFS4ERR_DELAY and NFS4ERR_GRACE in nfs4_open_delegation_recall Greg Kroah-Hartman
2013-05-06 22:56 ` [ 49/63] nfsd4: dont close read-write opens too soon Greg Kroah-Hartman
2013-05-06 22:56 ` [ 50/63] nfsd: Decode and send 64bit time values Greg Kroah-Hartman
2013-05-06 22:56 ` [ 51/63] wireless: regulatory: fix channel disabling race condition Greg Kroah-Hartman
2013-05-06 22:56 ` [ 52/63] ipc: sysv shared memory limited to 8TiB Greg Kroah-Hartman
2013-05-06 22:56 ` [ 53/63] ixgbe: fix EICR write in ixgbe_msix_other Greg Kroah-Hartman
2013-05-06 22:56 ` [ 54/63] jbd2: fix race between jbd2_journal_remove_checkpoint and ->j_commit_callback Greg Kroah-Hartman
2013-05-06 22:56 ` [ 55/63] ext4: fix journal callback list traversal Greg Kroah-Hartman
2013-05-06 22:56 ` [ 56/63] ext4: fix online resizing for ext3-compat file systems Greg Kroah-Hartman
2013-05-06 22:56 ` [ 57/63] ext4: fix Kconfig documentation for CONFIG_EXT4_DEBUG Greg Kroah-Hartman
2013-05-06 22:56 ` [ 58/63] mmc: at91/avr32/atmel-mci: fix DMA-channel leak on module unload Greg Kroah-Hartman
2013-05-06 22:56 ` [ 59/63] KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions Greg Kroah-Hartman
2013-05-06 22:56 ` [ 60/63] x86: Eliminate irq_mis_count counted in arch_irq_stat Greg Kroah-Hartman
2013-05-06 22:56 ` [ 61/63] mmc: core: Fix bit width test failing on old eMMC cards Greg Kroah-Hartman
2013-05-06 22:56 ` [ 62/63] mmc: atmel-mci: pio hang on block errors Greg Kroah-Hartman
2013-05-06 22:56 ` [ 63/63] mfd: adp5520: Restore mode bits on resume Greg Kroah-Hartman
[not found] ` <CAKocOOOxtJMoqWVgPLcrCJZ0kJuJ-QF0vQEU6Vk70n4J=+9ttw@mail.gmail.com>
2013-05-07 19:20 ` [ 00/63] 3.4.44-stable review Shuah Khan
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=20130506225325.499699191@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=700333@bugs.debian.org \
--cc=ben@decadent.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=vitalif@yourcmc.ru \
/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