kernel-ark/drivers
Paul E. McKenney 778935778c PM / runtime: Use _rcuidle for runtime suspend tracepoints
Further testing with false negatives suppressed by commit 293e2421fe
("rcu: Remove superfluous versions of rcu_read_lock_sched_held()")
identified a few more unprotected uses of RCU from the idle loop.
Because RCU actively ignores idle-loop code (for energy-efficiency
reasons, among other things), using RCU from the idle loop can result
in too-short grace periods, in turn resulting in arbitrary misbehavior.

The affected function is rpm_suspend().

The resulting lockdep-RCU splat is as follows:

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

Warning from omap3

===============================
[ INFO: suspicious RCU usage. ]
4.6.0-rc5-next-20160426+ #1112 Not tainted
-------------------------------
include/trace/events/rpm.h:63 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 0
RCU used illegally from extended quiescent state!
1 lock held by swapper/0/0:
 #0:  (&(&dev->power.lock)->rlock){-.-...}, at: [<c052ee24>] __pm_runtime_suspend+0x54/0x84

stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.6.0-rc5-next-20160426+ #1112
Hardware name: Generic OMAP36xx (Flattened Device Tree)
[<c0110308>] (unwind_backtrace) from [<c010c3a8>] (show_stack+0x10/0x14)
[<c010c3a8>] (show_stack) from [<c047fec8>] (dump_stack+0xb0/0xe4)
[<c047fec8>] (dump_stack) from [<c052d7b4>] (rpm_suspend+0x604/0x7e4)
[<c052d7b4>] (rpm_suspend) from [<c052ee34>] (__pm_runtime_suspend+0x64/0x84)
[<c052ee34>] (__pm_runtime_suspend) from [<c04bf3bc>] (omap2_gpio_prepare_for_idle+0x5c/0x70)
[<c04bf3bc>] (omap2_gpio_prepare_for_idle) from [<c01255e8>] (omap_sram_idle+0x140/0x244)
[<c01255e8>] (omap_sram_idle) from [<c0126b48>] (omap3_enter_idle_bm+0xfc/0x1ec)
[<c0126b48>] (omap3_enter_idle_bm) from [<c0601db8>] (cpuidle_enter_state+0x80/0x3d4)
[<c0601db8>] (cpuidle_enter_state) from [<c0183c74>] (cpu_startup_entry+0x198/0x3a0)
[<c0183c74>] (cpu_startup_entry) from [<c0b00c0c>] (start_kernel+0x354/0x3c8)
[<c0b00c0c>] (start_kernel) from [<8000807c>] (0x8000807c)

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

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-09-16 02:59:58 +02:00
..
accessibility
acpi Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm 2016-09-10 09:58:52 -07:00
amba
android Revert "android: binder: fix dangling pointer comparison" 2016-08-18 17:21:37 +02:00
ata pata_ninja32: Avoid corrupting status flags 2016-08-30 11:59:47 -04:00
atm
auxdisplay
base PM / runtime: Use _rcuidle for runtime suspend tracepoints 2016-09-16 02:59:58 +02:00
bcma wireless-drivers-next patches for 4.8 2016-07-25 11:09:19 -07:00
block Revert "floppy: refactor open() flags handling" 2016-08-25 08:56:51 -06:00
bluetooth
bus arm-cci: pmu: Fix typo in event name 2016-09-07 21:24:42 -07:00
cdrom
char virtio: fixes for 4.8 2016-09-09 14:52:05 -07:00
clk Some fixes for rk3399 register errors that revealed themself 2016-08-29 17:08:35 -07:00
clocksource clocksource/drivers/atmel-pit: Fix compilation error 2016-08-29 09:51:39 +02:00
connector
cpufreq cpufreq: dt: Add terminate entry for of_device_id tables 2016-08-31 02:49:05 +02:00
cpuidle powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
crypto crypto: caam - fix IV loading for authenc (giv)decryption 2016-08-31 22:50:42 +08:00
dax dax: fix mapping size check 2016-09-03 10:40:57 -07:00
dca
devfreq
dio
dma dmaengine: img-mdc: fix a possible NULL dereference 2016-08-22 11:57:49 +05:30
dma-buf
edac EDAC, skx_edac: Add EDAC driver for Skylake 2016-08-21 10:58:34 -07:00
eisa
extcon
firewire
firmware Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2016-09-08 12:19:24 -07:00
fmc
fpga drivers/fpga/Kconfig: fix build failure 2016-08-04 08:50:07 -04:00
gpio gpio: sa1100: fix irq probing for ucb1x00 2016-09-08 00:42:57 +02:00
gpu This pull request brings in fixes for VC4 3D in 4.8, most of which are 2016-09-02 15:55:15 +10:00
hid Merge branch 'for-4.8/hid-led' into for-linus 2016-07-28 10:49:23 +02:00
hsi
hv
hwmon hwmon: (it87) Add missing sysfs attribute group terminator 2016-08-29 05:31:31 -07:00
hwspinlock
hwtracing Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-29 13:55:30 -07:00
i2c i2c: rk3x: Restore clock settings at resume time 2016-09-08 22:50:33 +02:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide 2016-07-29 13:29:06 -07:00
idle Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-30 12:56:26 -07:00
iio Second set of IIO fixes for the 4.8 cycle. 2016-09-09 13:44:37 +02:00
infiniband IB/hfi1: Rework debugfs to use SRCU 2016-09-02 14:26:55 -04:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-08-26 18:36:23 -07:00
iommu Merge branch 'for-joerg/arm-smmu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into iommu/fixes 2016-08-22 12:33:56 +02:00
ipack
irqchip irqchip/mips-gic: Implement activate op for device domain 2016-08-22 18:37:51 +02:00
isdn
leds powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
lguest
lightnvm
macintosh drivers/macintosh: Delete owner assignment 2016-08-22 11:09:33 +10:00
mailbox fix📫bcm-pdc-mailbox:mark symbols static where possible 2016-08-29 18:43:39 +05:30
mcb
md - a stable fix in both DM crypt and DM log-writes for too large bios (as 2016-09-03 17:29:58 -07:00
media media updates for v4.8-rc1 2016-08-04 09:59:37 -04:00
memory memory: omap-gpmc: allow probe of child nodes to fail 2016-08-08 11:18:40 +03:00
memstick memstick: don't allocate unused major for ms_block 2016-08-02 17:31:41 -04:00
message
mfd ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
misc lkdtm: adjust usercopy tests to bypass const checks 2016-09-06 12:17:30 -07:00
mmc mmc: fix use-after-free of struct request 2016-08-25 14:11:43 -06:00
mtd This pull request contains mostly cleanups and minor 2016-08-04 19:51:49 -04:00
net Add Killer E2500 device ID in alx driver. 2016-08-29 00:23:50 -04:00
nfc
ntb NTB: ntb_hw_intel: use local variable pdev 2016-08-05 10:34:13 -04:00
nubus
nvdimm libnvdimm: allow legacy (e820) pmem region to clear bad blocks 2016-09-09 17:34:46 -07:00
nvme nvme: make NVME_RDMA depend on BLOCK 2016-09-11 14:41:49 -07:00
nvmem
of of: fix reference counting in of_graph_get_endpoint_by_regs 2016-08-15 11:15:05 -05:00
oprofile
parisc dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
parport
pci Char/Misc driver fixes for 4.8-rc5 2016-09-03 11:38:43 -07:00
pcmcia
perf drivers/perf: arm_pmu: Fix NULL pointer dereference during probe 2016-09-02 17:17:52 +01:00
phy phy: sun9i-usb: fix error handling 2016-08-12 14:59:10 +05:30
pinctrl pinctrl: sunxi: fix uart1 CTS/RTS pins at PG on A23/A33 2016-08-23 12:28:31 +02:00
platform intel_pmic_gpio: Make explicitly non-modular 2016-08-28 22:31:52 -07:00
pnp PNP: pnpbios: add header file to fix build errors 2016-07-27 18:52:54 +02:00
power power_supply: tps65217-charger: fix missing platform_set_drvdata() 2016-08-15 23:10:44 +02:00
powercap
pps pps: do not crash when failed to register 2016-07-23 10:25:54 +09:00
ps3
ptp
pwm pwm: Changes for v4.8-rc1 2016-08-06 00:01:33 -04:00
rapidio rapidio/tsi721: fix incorrect detection of address translation condition 2016-09-01 17:52:02 -07:00
ras
regulator Merge remote-tracking branches 'regulator/fix/email' and 'regulator/fix/qcom-smd' into regulator-linus 2016-09-06 12:31:34 +01:00
remoteproc dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
reset
rpmsg
rtc RTC for 4.8 2016-08-05 09:48:22 -04:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-08-16 15:50:22 -07:00
sbus
scsi SCSI fixes on 20160906 2016-09-06 11:06:52 -07:00
sfi
sh
sn
soc ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
spi Merge remote-tracking branches 'spi/fix/lock', 'spi/fix/maintainers', 'spi/fix/put', 'spi/fix/pxa2xx', 'spi/fix/sh-msiof' and 'spi/fix/timeout' into spi-linus 2016-09-06 12:32:09 +01:00
spmi
ssb
staging First round of IIO fixes for the 4.8 cycle. 2016-08-23 17:39:31 -04:00
target target: iblock_execute_sync_cache() should use bio_set_op_attrs() 2016-08-07 14:41:02 -06:00
tc
thermal thermal: rcar_thermal: Fix priv->zone error handling 2016-09-06 20:46:06 +08:00
thunderbolt thunderbolt: Don't declare Falcon Ridge unsupported 2016-08-31 13:25:02 +02:00
tty serial: 8250: added acces i/o products quad and octal serial cards 2016-08-31 16:28:26 +02:00
uio
usb usb: fixes for v4.8-rc6 2016-09-09 15:11:35 +02:00
uwb
vfio vfio/pci: Fix NULL pointer oops in error interrupt setup handling 2016-08-08 16:16:23 -06:00
vhost vhost/scsi: fix reuse of &vq->iov[out] in response 2016-08-23 17:16:57 +03:00
video dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
virt
virtio virtio: mark vring_dma_dev() static 2016-09-09 21:12:35 +03:00
vlynq
vme
w1 w1:omap_hdq: fix regression 2016-08-02 19:35:40 -04:00
watchdog watchdog: gpio_wdt: Fix missing platform_set_drvdata() in gpio_wdt_probe() 2016-07-27 10:47:43 +02:00
xen xenbus: don't look up transaction IDs for ordinary writes 2016-08-24 18:16:18 +01:00
zorro
Kconfig
Makefile virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00