linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: akpm@linux-foundation.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: [ 069/128] ACPI / cpuidle: Fix NULL pointer issues when cpuidle is disabled
Date: Sun, 03 Feb 2013 15:47:53 +0100	[thread overview]
Message-ID: <20130203144650.157779624@decadent.org.uk> (raw)
In-Reply-To: <20130203144644.035172954@decadent.org.uk>

3.2-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

commit b88a634a903d9670aa5f2f785aa890628ce0dece upstream.

If cpuidle is disabled, that means that:

	per_cpu(acpi_cpuidle_device, pr->id)

is set to NULL as the acpi_processor_power_init ends up failing at

	 retval = cpuidle_register_driver(&acpi_idle_driver)

(in acpi_processor_power_init) and never sets the per_cpu idle
device.  So when acpi_processor_hotplug on CPU online notification
tries to reference said device it crashes:

cpu 3 spinlock event irq 62
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
IP: [<ffffffff81381013>] acpi_processor_setup_cpuidle_cx+0x3f/0x105
PGD a259b067 PUD ab38b067 PMD 0
Oops: 0002 [#1] SMP
odules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi libcrc32c crc32c nouveau mxm_wmi wmi radeon ttm sg sr_mod sd_mod cdrom ata_generic ata_piix libata crc32c_intel scsi_mod atl1c i915 fbcon tileblit font bitblit softcursor drm_kms_helper video xen_blkfront xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea xenfs xen_privcmd mperf
CPU 1
Pid: 3047, comm: bash Not tainted 3.8.0-rc3upstream-00250-g165c029 #1 MSI MS-7680/H61M-P23 (MS-7680)
RIP: e030:[<ffffffff81381013>]  [<ffffffff81381013>] acpi_processor_setup_cpuidle_cx+0x3f/0x105
RSP: e02b:ffff88001742dca8  EFLAGS: 00010202
RAX: 0000000000010be9 RBX: ffff8800a0a61800 RCX: ffff880105380000
RDX: 0000000000000003 RSI: 0000000000000200 RDI: ffff8800a0a61800
RBP: ffff88001742dce8 R08: ffffffff81812360 R09: 0000000000000200
R10: aaaaaaaaaaaaaaaa R11: 0000000000000001 R12: ffff8800a0a61800
R13: 00000000ffffff01 R14: 0000000000000000 R15: ffffffff81a907a0
FS:  00007fd6942f7700(0000) GS:ffff880105280000(0000) knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000004 CR3: 00000000a6773000 CR4: 0000000000042660
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process bash (pid: 3047, threadinfo ffff88001742c000, task ffff880017944000)
Stack:
 0000000000000150 ffff880100f59e00 ffff88001742dcd8 ffff8800a0a61800
 0000000000000000 00000000ffffff01 0000000000000000 ffffffff81a907a0
 ffff88001742dd18 ffffffff813815b1 ffff88001742dd08 ffffffff810ae336
Call Trace:
 [<ffffffff813815b1>] acpi_processor_hotplug+0x7c/0x9f
 [<ffffffff810ae336>] ? schedule_delayed_work_on+0x16/0x20
 [<ffffffff8137ee8f>] acpi_cpu_soft_notify+0x90/0xca
 [<ffffffff8166023d>] notifier_call_chain+0x4d/0x70
 [<ffffffff810bc369>] __raw_notifier_call_chain+0x9/0x10
 [<ffffffff81094a4b>] __cpu_notify+0x1b/0x30
 [<ffffffff81652cf7>] _cpu_up+0x103/0x14b
 [<ffffffff81652e18>] cpu_up+0xd9/0xec
 [<ffffffff8164a254>] store_online+0x94/0xd0
 [<ffffffff814122fb>] dev_attr_store+0x1b/0x20
 [<ffffffff81216404>] sysfs_write_file+0xf4/0x170

This patch fixes it.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/acpi/processor_idle.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f1a5da4..fea6f8d 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -958,6 +958,9 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr)
 		return -EINVAL;
 	}
 
+	if (!dev)
+		return -EINVAL;
+
 	dev->cpu = pr->id;
 
 	if (max_cstate == 0)



  parent reply	other threads:[~2013-02-03 15:11 UTC|newest]

Thread overview: 149+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-03 14:46 [ 000/128] 3.2.38-stable review Ben Hutchings
2013-02-03 14:46 ` [ 001/128] usb: gadget: dummy: fix enumeration with g_multi Ben Hutchings
2013-02-03 14:46 ` [ 002/128] usb: musb: core: print new line in the driver banner again Ben Hutchings
2013-02-03 14:46 ` [ 003/128] virtio-blk: Dont free ida when disk is in use Ben Hutchings
2013-02-03 14:46 ` [ 004/128] mac80211: use del_timer_sync for final sta cleanup timer deletion Ben Hutchings
2013-02-03 14:46 ` [ 005/128] xhci: Handle HS bulk/ctrl endpoints that dont NAK Ben Hutchings
2013-02-03 14:46 ` [ 006/128] USB: Handle auto-transition from hot to warm reset Ben Hutchings
2013-02-03 14:46 ` [ 007/128] USB: Ignore xHCI Reset Device status Ben Hutchings
2013-02-03 14:46 ` [ 008/128] USB: Allow USB 3.0 ports to be disabled Ben Hutchings
2013-02-03 14:46 ` [ 009/128] USB: Increase reset timeout Ben Hutchings
2013-02-03 14:46 ` [ 010/128] USB: Ignore port state until reset completes Ben Hutchings
2013-02-03 14:46 ` [ 011/128] USB: Handle warm reset failure on empty port Ben Hutchings
2013-02-03 14:46 ` [ 012/128] xhci: Avoid "dead ports", add roothub port polling Ben Hutchings
2013-02-03 14:46 ` [ 013/128] ASoC: wm5100: Remove DSP B and left justified formats Ben Hutchings
2013-02-03 14:46 ` [ 014/128] mwifiex: wakeup and stop multiple tx queues in net_device Ben Hutchings
2013-02-04 19:43   ` Bing Zhao
2013-02-04 23:41     ` Ben Hutchings
2013-02-05  0:36       ` Bing Zhao
2013-02-06  4:21         ` Ben Hutchings
2013-02-05 18:44       ` Bing Zhao
2013-02-03 14:46 ` [ 015/128] mwifiex: handle association failure case correctly Ben Hutchings
2013-02-03 14:47 ` [ 016/128] mwifiex: check wait_event_interruptible return value Ben Hutchings
2013-02-03 14:47 ` [ 017/128] ASoC: wm2000: Fix sense of speech clarity enable Ben Hutchings
2013-02-03 14:47 ` [ 018/128] ioat: Fix DMA memory sync direction correct flag Ben Hutchings
2013-02-03 14:47 ` [ 019/128] drm/i915; Only increment the user-pin-count after successfully pinning the bo Ben Hutchings
2013-02-03 14:47 ` [ 020/128] staging: r8712u: Add new device ID Ben Hutchings
2013-02-03 14:47 ` [ 021/128] staging: speakup: avoid out-of-range access in synth_init() Ben Hutchings
2013-02-03 14:47 ` [ 022/128] staging: speakup: avoid out-of-range access in synth_add() Ben Hutchings
2013-02-03 14:47 ` [ 023/128] staging: comedi: fix minimum AO period for NI 625x and NI 628x Ben Hutchings
2013-02-03 14:47 ` [ 024/128] staging: comedi: comedi_test: fix race when cancelling command Ben Hutchings
2013-02-03 14:47 ` [ 025/128] regulator: max8997: Use uV in voltage_map_desc Ben Hutchings
2013-02-03 14:47 ` [ 026/128] ALSA: pxa27x: fix ac97 cold reset Ben Hutchings
2013-02-03 14:47 ` [ 027/128] ALSA: pxa27x: fix ac97 warm reset Ben Hutchings
2013-02-03 14:47 ` [ 028/128] SUNRPC: Ensure we release the socket write lock if the rpc_task exits early Ben Hutchings
2013-02-03 14:47 ` [ 029/128] target: use correct sense code for LUN communication failure Ben Hutchings
2013-02-03 14:47 ` [ 030/128] Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs" Ben Hutchings
2013-02-03 14:47 ` [ 031/128] regulator: max8998: Ensure enough delay time for max8998_set_voltage_buck_time_sel Ben Hutchings
2013-02-03 14:47 ` [ 032/128] radeon/kms: force rn50 chip to always report connected on analog output Ben Hutchings
2013-02-03 14:47 ` [ 033/128] tcm_fc: Do not indicate retry capability to initiators Ben Hutchings
2013-02-03 14:47 ` [ 034/128] tcm_fc: Do not report target role when target is not defined Ben Hutchings
2013-02-03 14:47 ` [ 035/128] sh: Fix FDPIC binary loader Ben Hutchings
2013-02-03 14:47 ` [ 036/128] USB: option: Add new MEDIATEK PID support Ben Hutchings
2013-02-03 14:47 ` [ 037/128] USB: option: blacklist network interface on ZTE MF880 Ben Hutchings
2013-02-03 14:47 ` [ 038/128] USB: option: add Telekom Speedstick LTE II Ben Hutchings
2013-02-03 14:47 ` [ 039/128] USB: option: add Nexpring NP10T terminal id Ben Hutchings
2013-02-03 14:47 ` [ 040/128] USB: cdc-acm: Add support for "PSC Scanning, Magellan 800i" Ben Hutchings
2013-02-03 14:47 ` [ 041/128] USB: hub: handle claim of enabled remote wakeup after reset Ben Hutchings
2013-02-03 14:47 ` [ 042/128] mm: compaction: fix echo 1 > compact_memory return error issue Ben Hutchings
2013-02-03 14:47 ` [ 043/128] mm: use aligned zone start for pfn_to_bitidx calculation Ben Hutchings
2013-02-03 14:47 ` [ 044/128] USB: Add device quirk for Microsoft VX700 webcam Ben Hutchings
2013-02-03 14:47 ` [ 045/128] PCI: pciehp: Fix wrong workqueue cleanup Ben Hutchings
2013-02-03 14:47 ` [ 046/128] PCI: pciehp: Handle push button event asynchronously Ben Hutchings
2013-02-03 14:47 ` [ 047/128] PCI: pciehp: Use per-slot workqueues to avoid deadlock Ben Hutchings
2013-02-03 14:47 ` [ 048/128] usb: ftdi_sio: Crucible Technologies COMET Caller ID - pid added Ben Hutchings
2013-02-03 14:47 ` [ 049/128] PCI/AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put() Ben Hutchings
2013-02-03 14:47 ` [ 050/128] PCI: shpchp: Handle push button event asynchronously Ben Hutchings
2013-02-03 14:47 ` [ 051/128] PCI: shpchp: Use per-slot workqueues to avoid deadlock Ben Hutchings
2013-02-03 14:47 ` [ 052/128] PCI: Allow pcie_aspm=force even when FADT indicates it is unsupported Ben Hutchings
2013-02-03 14:47 ` [ 053/128] serial:ifx6x60:Delete SPI timer when shut down port Ben Hutchings
2013-02-03 14:47 ` [ 054/128] tty: 8250_dw: Fix inverted arguments to serial_out in IRQ handler Ben Hutchings
2013-02-03 14:47 ` [ 055/128] drm/i915: Invalidate the relocation presumed_offsets along the slow path Ben Hutchings
2013-02-03 14:47 ` [ 056/128] s390/time: fix sched_clock() overflow Ben Hutchings
2013-02-03 14:47 ` [ 057/128] ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone Ben Hutchings
2013-02-03 14:47 ` [ 058/128] ARM: 7628/1: head.S: map one extra section for the ATAG/DTB area Ben Hutchings
2013-02-03 15:17   ` Ben Hutchings
2013-02-03 18:36     ` Nicolas Pitre
2013-02-03 14:47 ` [ 059/128] xen: Fix stack corruption in xen_failsafe_callback for 32bit PVOPS guests Ben Hutchings
2013-02-03 14:47 ` [ 060/128] staging: vt6656: Fix inconsistent structure packing Ben Hutchings
2013-02-03 14:47 ` [ 061/128] 8250: blacklist Winbond CIR port Ben Hutchings
2013-02-03 17:26   ` Sean Young
2013-02-03 23:23     ` Ben Hutchings
2013-02-03 14:47 ` [ 062/128] 8250/16?50: Add support for Broadcom TruManage redirected serial port Ben Hutchings
2013-02-03 14:47 ` [ 063/128] KVM: PPC: Emulate dcbf Ben Hutchings
2013-02-03 14:47 ` [ 064/128] USB: option: blacklist network interface on ONDA MT8205 4G LTE Ben Hutchings
2013-02-03 14:47 ` [ 065/128] USB: option: add TP-LINK HSUPA Modem MA180 Ben Hutchings
2013-02-03 14:47 ` [ 066/128] USB: io_ti: Fix NULL dereference in chase_port() Ben Hutchings
2013-02-03 14:47 ` [ 067/128] usb: dwc3: gadget: fix ep->maxburst for ep0 Ben Hutchings
2013-02-03 14:47 ` [ 068/128] intel_idle: Dont register CPU notifier if we are not running Ben Hutchings
2013-02-03 14:47 ` Ben Hutchings [this message]
2013-02-03 14:47 ` [ 070/128] ACPI / processor: Get power info before updating the C-states Ben Hutchings
2013-02-03 14:47 ` [ 071/128] ARM: DMA: Fix struct page iterator in dma_cache_maint() to work with sparsemem Ben Hutchings
2013-02-03 14:47 ` [ 072/128] evm: checking if removexattr is not a NULL Ben Hutchings
2013-02-03 14:47 ` [ 073/128] ALSA: hda - Add Conexant CX20751/2/3/4 codec support Ben Hutchings
2013-02-03 14:47 ` [ 074/128] ALSA: hda/conexant - Correct vendor IDs for new codecs Ben Hutchings
2013-02-03 14:47 ` [ 075/128] ALSA: hda - Add Conexant CX20755/20756/20757 codec IDs Ben Hutchings
2013-02-03 14:48 ` [ 076/128] ftrace: Be first to run code modification on modules Ben Hutchings
2013-02-03 14:48 ` [ 077/128] USB: UHCI: fix IRQ race during initialization Ben Hutchings
2013-02-03 14:48 ` [ 078/128] fs/cifs/cifs_dfs_ref.c: fix potential memory leakage Ben Hutchings
2013-02-03 14:48 ` [ 079/128] Bluetooth: Fix incorrect strncpy() in hidp_setup_hid() Ben Hutchings
2013-02-03 14:48 ` [ 080/128] ath9k_htc: Fix memory leak Ben Hutchings
2013-02-03 14:48 ` [ 081/128] ath9k: do not link receive buffers during flush Ben Hutchings
2013-02-03 14:48 ` [ 082/128] ath9k: fix double-free bug on beacon generate failure Ben Hutchings
2013-02-03 14:48 ` [ 083/128] brcmsmac: increase timer reference count for new timers only Ben Hutchings
2013-02-03 14:48 ` [ 084/128] efi, x86: Pass a proper identity mapping in efi_call_phys_prelog Ben Hutchings
2013-02-03 14:48 ` [ 085/128] ath9k_hw: fix calibration issues on chainmask that dont include chain 0 Ben Hutchings
2013-02-03 14:48 ` [ 086/128] ath9k_hw: fix chain swap setting when setting rx chainmask to 5 Ben Hutchings
2013-02-03 14:48 ` [ 087/128] mwifiex: fix typo in PCIe adapter NULL check Ben Hutchings
2013-02-03 14:48 ` [ 088/128] drm/i915: Remove the MI_FLUSH_ENABLE setting Ben Hutchings
2013-02-03 14:48 ` [ 089/128] drm/i915: Correct the bit number for the MI_FLUSH_ENABLE Ben Hutchings
2013-02-03 14:48 ` [ 090/128] drm/i915: Disable AsyncFlip performance optimisations Ben Hutchings
2013-02-03 14:48 ` [ 091/128] drm/i915: GFX_MODE Flush TLB Invalidate Mode must be 1 for scanline waits Ben Hutchings
2013-02-03 14:48 ` [ 092/128] iommu/intel: disable DMAR for g4x integrated gfx Ben Hutchings
2013-02-03 16:24   ` Mihai Moldovan
2013-02-03 20:14     ` Greg KH
2013-02-03 14:48 ` [ 093/128] drm/i915: dump UTS_RELEASE into the error_state Ben Hutchings
2013-02-03 14:48 ` [ 094/128] drm/radeon: fix a rare case of double kfree Ben Hutchings
2013-02-03 14:48 ` [ 095/128] x86/msr: Add capabilities check Ben Hutchings
2013-02-03 14:48 ` [ 096/128] can: c_can: fix invalid error codes Ben Hutchings
2013-02-03 14:48 ` [ 097/128] can: ti_hecc: " Ben Hutchings
2013-02-03 14:48 ` [ 098/128] can: pch_can: " Ben Hutchings
2013-02-03 14:48 ` [ 099/128] ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices Ben Hutchings
2013-02-03 14:48 ` [ 100/128] smp: Fix SMP function call empty cpu mask race Ben Hutchings
2013-02-03 14:48 ` [ 101/128] IOMMU, AMD Family15h Model10-1Fh erratum 746 Workaround Ben Hutchings
2013-02-03 14:48 ` [ 102/128] xfs: Fix possible use-after-free with AIO Ben Hutchings
2013-02-03 14:48 ` [ 103/128] ALSA: hda - Fix non-snoop page handling Ben Hutchings
2013-02-03 14:48 ` [ 104/128] EDAC: Test correct variable in ->store function Ben Hutchings
2013-02-03 14:48 ` [ 105/128] efi: Make efi_enabled a function to query EFI facilities Ben Hutchings
2013-02-03 15:15   ` Ben Hutchings
2013-02-04 16:44     ` Matt Fleming
2013-02-04 18:20       ` Greg KH
2013-02-06  4:45         ` Ben Hutchings
2013-02-05  3:46       ` Ben Hutchings
2013-02-05 15:40         ` Peter Jones
2013-02-03 14:48 ` [ 106/128] samsung-laptop: Disable on EFI hardware Ben Hutchings
2013-02-03 14:48 ` [ 107/128] NFS: Dont silently fail setattr() requests on mountpoints Ben Hutchings
2013-02-03 14:48 ` [ 108/128] NFSv4.1: Handle NFS4ERR_DELAY when resetting the NFSv4.1 session Ben Hutchings
2013-02-03 14:48 ` [ 109/128] x86/Sandy Bridge: reserve pages when integrated graphics is present Ben Hutchings
2013-02-03 14:48 ` [ 110/128] x86/Sandy Bridge: mark arrays in __init functions as __initconst Ben Hutchings
2013-02-03 14:48 ` [ 111/128] x86/Sandy Bridge: Sandy Bridge workaround depends on CONFIG_PCI Ben Hutchings
2013-02-03 14:48 ` [ 112/128] ahci: Add identifiers for ASM106x devices Ben Hutchings
2013-02-03 14:48 ` [ 113/128] [SCSI] sd: Reshuffle init_sd to avoid crash Ben Hutchings
2013-02-03 14:48 ` [ 114/128] drivers/firmware/dmi_scan.c: check dmi version when get system uuid Ben Hutchings
2013-02-03 14:48 ` [ 115/128] drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists Ben Hutchings
2013-02-03 14:48 ` [ 116/128] drm/i915: Implement WaDisableHiZPlanesWhenMSAAEnabled Ben Hutchings
2013-02-03 14:48 ` [ 117/128] x86: Use enum instead of literals for trap values Ben Hutchings
2013-02-03 14:48 ` [ 118/128] staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC Ben Hutchings
2013-02-03 14:48 ` [ 119/128] Revert "drm/i915: no lvds quirk for Zotac ZDBOX SD ID12/ID13" Ben Hutchings
2013-02-03 14:48 ` [ 120/128] staging: comedi: dont hijack hardware device private data Ben Hutchings
2013-02-03 14:48 ` [ 121/128] intel-iommu: Prevent devices with RMRRs from being placed into SI Domain Ben Hutchings
2013-02-03 14:48 ` [ 122/128] ALSA: usb - fix race in creation of M-Audio Fast track pro driver Ben Hutchings
2013-02-03 14:48 ` [ 123/128] igb: release already assigned MSI-X interrupts if setup fails Ben Hutchings
2013-02-03 14:48 ` [ 124/128] drbd: add missing part_round_stats to _drbd_start_io_acct Ben Hutchings
2013-02-03 14:48 ` [ 125/128] ALSA: usb-audio: Fix regression by disconnection-race-fix patch Ben Hutchings
2013-02-03 14:48 ` [ 126/128] staging: usbip: changed function return type to void Ben Hutchings
2013-02-03 14:48 ` [ 127/128] x86, efi: Set runtime_version to the EFI spec revision Ben Hutchings
2013-02-03 14:48 ` [ 128/128] printk: fix buffer overflow when calling log_prefix function from call_console_drivers Ben Hutchings
2013-02-03 15:20 ` [ 000/128] 3.2.38-stable review Ben Hutchings
2013-02-04 14:39 ` Satoru Takeuchi
2013-02-06  4:17   ` Ben Hutchings

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=20130203144650.157779624@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stable@vger.kernel.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).