Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1593053
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.12 097/113] cpufreq: fix garbage kobjects on errors during suspend/resume |
| Date | 2017-03-06 10:30 +0100 |
| Message-ID | <thX7R-68q-33@gated-at.bofh.it> (permalink) |
| References | <thWY9-64J-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Bjørn Mork <bjorn@mork.no>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 2167e2399dc5e69c62db56d933e9c8cbe107620a upstream.
This is effectively a revert of commit 5302c3fb2e62 ("cpufreq: Perform
light-weight init/teardown during suspend/resume"), which enabled
suspend/resume optimizations leaving the sysfs files in place.
Errors during suspend/resume are not handled properly, leaving
dead sysfs attributes in case of failures. There are are number of
functions with special code for the "frozen" case, and all these
need to also have special error handling.
The problem is easy to demonstrate by making cpufreq_driver->init()
or cpufreq_driver->get() fail during resume.
The code is too complex for a simple fix, with split code paths
in multiple blocks within a number of functions. It is therefore
best to revert the patch enabling this code until the error handling
is in place.
Examples of problems resulting from resume errors:
WARNING: CPU: 0 PID: 6055 at fs/sysfs/file.c:343 sysfs_open_file+0x77/0x212()
missing sysfs attribute operations for kobject: (null)
Modules linked in: [stripped as irrelevant]
CPU: 0 PID: 6055 Comm: grep Tainted: G D 3.13.0-rc2 #153
Hardware name: LENOVO 2776LEG/2776LEG, BIOS 6EET55WW (3.15 ) 12/19/2011
0000000000000009 ffff8802327ebb78 ffffffff81380b0e 0000000000000006
ffff8802327ebbc8 ffff8802327ebbb8 ffffffff81038635 0000000000000000
ffffffff811823c7 ffff88021a19e688 ffff88021a19e688 ffff8802302f9310
Call Trace:
[<ffffffff81380b0e>] dump_stack+0x55/0x76
[<ffffffff81038635>] warn_slowpath_common+0x7c/0x96
[<ffffffff811823c7>] ? sysfs_open_file+0x77/0x212
[<ffffffff810386e3>] warn_slowpath_fmt+0x41/0x43
[<ffffffff81182dec>] ? sysfs_get_active+0x6b/0x82
[<ffffffff81182382>] ? sysfs_open_file+0x32/0x212
[<ffffffff811823c7>] sysfs_open_file+0x77/0x212
[<ffffffff81182350>] ? sysfs_schedule_callback+0x1ac/0x1ac
[<ffffffff81122562>] do_dentry_open+0x17c/0x257
[<ffffffff8112267e>] finish_open+0x41/0x4f
[<ffffffff81130225>] do_last+0x80c/0x9ba
[<ffffffff8112dbbd>] ? inode_permission+0x40/0x42
[<ffffffff81130606>] path_openat+0x233/0x4a1
[<ffffffff81130b7e>] do_filp_open+0x35/0x85
[<ffffffff8113b787>] ? __alloc_fd+0x172/0x184
[<ffffffff811232ea>] do_sys_open+0x6b/0xfa
[<ffffffff811233a7>] SyS_openat+0xf/0x11
[<ffffffff8138c812>] system_call_fastpath+0x16/0x1b
The failure to restore cpufreq devices on cancelled hibernation is
not a new bug. It is caused by the ACPI _PPC call failing unless the
hibernate is completed. This makes the acpi_cpufreq driver fail its
init.
Previously, the cpufreq device could be restored by offlining the
cpu temporarily. And as a complete hibernation cycle would do this,
it would be automatically restored most of the time. But after
commit 5302c3fb2e62 the leftover sysfs attributes will block any
device add action. Therefore offlining and onlining CPU 1 will no
longer restore the cpufreq object, and a complete suspend/resume
cycle will replace it with garbage.
Fixes: 5302c3fb2e62 ("cpufreq: Perform light-weight init/teardown during suspend/resume")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/cpufreq/cpufreq.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 8356b481e339..cf2602350dca 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2062,9 +2062,6 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
dev = get_cpu_device(cpu);
if (dev) {
- if (action & CPU_TASKS_FROZEN)
- frozen = true;
-
switch (action & ~CPU_TASKS_FROZEN) {
case CPU_ONLINE:
__cpufreq_add_dev(dev, NULL, frozen);
--
2.12.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3.12 000/113] 3.12.71-stable review Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:20 +0100
[PATCH 3.12 001/113] x86/Kconfig: Simplify X86_IO_APIC dependencies Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:20 +0100
[PATCH 3.12 092/113] ocfs2: do not write error flag to user structure we cannot copy from/to Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:20 +0100
[PATCH 3.12 111/113] USB: cdc-acm: fix double usb_autopm_put_interface() in acm_port_activate() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:20 +0100
[PATCH 3.12 089/113] af_packet: remove a stray tab in packet_set_ring() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:20 +0100
[PATCH 3.12 103/113] ipv6: simplify detection of first operational link-local address on interface Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:20 +0100
[PATCH 3.12 102/113] net: 6lowpan: fix lowpan_header_create non-compression memcpy call Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:20 +0100
[PATCH 3.12 109/113] net: filter: x86: fix JIT address randomization Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:20 +0100
[PATCH 3.12 065/113] vfs: fix uninitialized flags in splice_to_pipe() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 077/113] tty: serial: msm: Fix module autoload Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 063/113] l2tp: do not use udp_ioctl() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 068/113] futex: Move futex_init() to core_initcall Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 076/113] net: socket: fix recvmmsg not returning error from sock_error Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 080/113] USB: serial: ftdi_sio: fix modem-status error handling Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 090/113] ext4: validate s_first_meta_bg at mount time Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 088/113] rtlwifi: rtl_usb: Fix for URB leaking when doing ifconfig up/down Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 096/113] drm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 086/113] x86/platform/goldfish: Prevent unconditional loading Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 074/113] dccp: fix freeing skb too early for IPV6_RECVPKTINFO Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 075/113] irda: Fix lockdep annotations in hashbin_delete(). Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 082/113] USB: serial: ftdi_sio: fix line-status over-reporting Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 059/113] macvtap: read vnet_hdr_size once Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 091/113] ext4: fix fencepost in s_first_meta_bg validation Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 097/113] cpufreq: fix garbage kobjects on errors during suspend/resume Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 099/113] cpufreq: Clean up after a failing light-weight initialization Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 061/113] packet: round up linear to header len Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 081/113] USB: serial: ftdi_sio: fix extreme low-latency setting Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 070/113] rtc: interface: ignore expired timers when enqueuing new timers Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 060/113] sctp: avoid BUG_ON on sctp_wait_for_sndbuf Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 084/113] USB: serial: opticon: fix CTS retrieval at open Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 057/113] tcp: avoid infinite loop in tcp_splice_read() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 071/113] net/llc: avoid BUG_ON() in skb_orphan() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 079/113] USB: serial: cp210x: add new IDs for GE Bx50v3 boards Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 085/113] USB: serial: ark3116: fix register-accessor error handling Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 095/113] Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 069/113] printk: use rcuidle console tracepoint Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 062/113] ping: fix a null pointer dereference Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 064/113] scsi: move the nr_phys_segments assert into scsi_init_io Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 072/113] packet: fix races in fanout_add() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 073/113] packet: Do not call fanout_release from atomic contexts Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 058/113] tun: read vnet_hdr_sz once Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 083/113] USB: serial: spcp8x5: fix modem-status handling Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 078/113] USB: serial: mos7840: fix another NULL-deref at open Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 087/113] goldfish: Sanitize the broken interrupt handler Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:30 +0100
[PATCH 3.12 023/113] USB: serial: option: add WeTelecom 0x6802 and 0x6803 products Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 037/113] USB: serial: option: add device ID for HP lt2523 (Novatel E371) Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 042/113] mac80211: Fix adding of mesh vendor IEs Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 050/113] ipv6: fix ip6_tnl_parse_tlv_enc_lim() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 034/113] USB: serial: qcserial: add Dell DW5570 QDL Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 055/113] netlabel: out of bound access in cipso_v4_validate() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 040/113] ARM: 8643/3: arm/ptrace: Preserve previous registers for short regset write Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 036/113] USB: Add quirk for WORLDE easykey.25 MIDI keyboard Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 041/113] target: Fix COMPARE_AND_WRITE ref leak for non GOOD status Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 051/113] ipv6: pointer math error in ip6_tnl_parse_tlv_enc_lim() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 054/113] ipv4: keep skb->dst around in presence of IP options Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 043/113] scsi: zfcp: fix use-after-free by not tracing WKA port open/close on failed send Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 067/113] scsi: don't BUG_ON() empty DMA transfers Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 026/113] drm/nouveau/nv1a,nv1f/disp: fix memory clock rate retrieval Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 022/113] USB: serial: option: add WeTelecom WM-D200 Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 053/113] net: use a work queue to defer net_disable_timestamp() work Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 029/113] svcrpc: fix oops in absence of krb5 module Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 033/113] can: bcm: fix hrtimer/tasklet termination in bcm op removal Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 066/113] siano: make it work again with CONFIG_VMAP_STACK Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 039/113] selinux: fix off-by-one in setprocattr Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 056/113] ip6_gre: fix ip6gre_err() invalid reads Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 049/113] can: Fix kernel panic at security_sock_rcv_skb Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 044/113] ALSA: seq: Fix race at creating a queue Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 035/113] USB: serial: pl2303: add ATEN device ID Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 032/113] mm, fs: check for fatal signals in do_generic_file_read() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 021/113] qmi_wwan/cdc_ether: add device ID for HP lt2523 (Novatel E371) WWAN card Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 031/113] mm/memory_hotplug.c: check start_pfn in test_pages_in_a_zone() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 025/113] USB: serial: option: add even more ZTE device ids Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 038/113] ARC: [arcompact] brown paper bag bug in unaligned access delay slot fixup Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 052/113] tcp: fix 0 divide in __tcp_select_window() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:40 +0100
[PATCH 3.12 007/113] ISDN: eicon: silence misleading array-bounds warning Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 012/113] nfs: Don't increment lock sequence ID after NFS4ERR_MOVED Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 011/113] parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 018/113] ipv6: addrconf: Avoid addrconf_disable_change() using RCU read-side lock Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 020/113] af_unix: move unix_mknod() out of bindlock Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 009/113] can: ti_hecc: add missing prepare and unprepare of the clock Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 016/113] platform/x86: intel_mid_powerbtn: Set IRQ_ONESHOT Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 008/113] can: c_can_pci: fix null-pointer-deref in c_can_start() - set device pointer Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 014/113] drm/i915: Don't leak edid in intel_crt_detect_ddc() Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 019/113] tcp: initialize max window for a new fastopen socket Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 015/113] s5k4ecgx: select CRC32 helper Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 003/113] net: possible use after free in dst_release Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 010/113] ARC: [arcompact] handle unaligned access delay slot corner case Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 013/113] SUNRPC: cleanup ida information when removing sunrpc module Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 017/113] net: fix harmonize_features() vs NETIF_F_HIGHDMA Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
[PATCH 3.12 002/113] crypto: caam - fix non-hmac hashes Jiri Slaby <jslaby@suse.cz> - 2017-03-06 10:50 +0100
Re: [PATCH 3.12 000/113] 3.12.71-stable review Guenter Roeck <linux@roeck-us.net> - 2017-03-06 15:50 +0100
Re: [PATCH 3.12 000/113] 3.12.71-stable review Jiri Slaby <jslaby@suse.cz> - 2017-03-09 21:00 +0100
Re: [PATCH 3.12 000/113] 3.12.71-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-03-06 20:30 +0100
csiph-web