linux_dsm_epyc7002/drivers/base/power
Rafael J. Wysocki 6d3dab7d84 PM / wakeirq: Avoid setting power.wakeirq too hastily
If dev_pm_attach_wake_irq() fails, the device's power.wakeirq field
should not be set to point to the struct wake_irq passed to that
function, as that object will be freed going forward.

For this reason, make dev_pm_attach_wake_irq() first call
device_wakeup_attach_irq() and only set the device's power.wakeirq
field if that's successful.

That requires device_wakeup_attach_irq() to be called under the
device's power.lock lock, but since dev_pm_attach_wake_irq() is
the only caller of it, the requisite changes are easy to make.

Fixes: 4990d4fe32 (PM / Wakeirq: Add automated device wake IRQ handling)
Reported-by: Felipe Balbi <balbi@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-07 13:08:39 +02:00
..
clock_ops.c PM / OPP / clk: Remove unnecessary OOM message 2015-02-12 02:00:52 +01:00
common.c PM: Convert dev_pm_put_subsys_data() into a void function 2015-02-03 22:59:25 +01:00
domain_governor.c PM: Drop CONFIG_PM_RUNTIME from the driver core 2014-12-04 00:46:58 +01:00
domain.c PM / domains: avoid potential oops in pm_genpd_remove_device() 2015-03-23 23:20:28 +01:00
generic_ops.c PM / Runtime: Spelling s/competing/completing/ 2014-03-26 16:33:53 +01:00
main.c PM / Wakeirq: Add automated device wake IRQ handling 2015-05-20 01:56:31 +02:00
Makefile PM / Wakeirq: Add automated device wake IRQ handling 2015-05-20 01:56:31 +02:00
opp.c PM / OPP / clk: Remove unnecessary OOM message 2015-02-12 02:00:52 +01:00
power.h PM / Wakeirq: Add automated device wake IRQ handling 2015-05-20 01:56:31 +02:00
qos.c PM / QoS: Use lockdep asserts to find missing hold of power.lock 2015-01-23 22:31:08 +01:00
runtime.c PM / Wakeirq: Add automated device wake IRQ handling 2015-05-20 01:56:31 +02:00
sysfs.c PM: Drop CONFIG_PM_RUNTIME from the driver core 2014-12-04 00:46:58 +01:00
trace.c PM / sleep: add pm-trace support for suspending phase 2015-03-18 15:54:27 +01:00
wakeirq.c PM / wakeirq: Avoid setting power.wakeirq too hastily 2015-07-07 13:08:39 +02:00
wakeup.c PM / wakeirq: Avoid setting power.wakeirq too hastily 2015-07-07 13:08:39 +02:00