Rafael J. Wysocki
22db06337f
ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep()
...
The addition of might_sleep() to down_timeout() caused the latter to
enable interrupts unconditionally in some cases, which in turn broke
the ACPI S3 wakeup path in acpi_suspend_enter(), where down_timeout()
is called by acpi_disable_all_gpes() via acpi_ut_acquire_mutex().
Namely, if CONFIG_DEBUG_ATOMIC_SLEEP is set, might_sleep() causes
might_resched() to be used and if CONFIG_PREEMPT_VOLUNTARY is set,
this triggers __cond_resched() which may call preempt_schedule_common(),
so __schedule() gets invoked and it ends up with enabled interrupts (in
the prev == next case).
Now, enabling interrupts early in the S3 wakeup path causes the kernel
to crash.
Address this by modifying acpi_suspend_enter() to disable GPEs without
attempting to acquire the sleeping lock which is not needed in that code
path anyway.
Fixes: 99409b935c9a ("locking/semaphore: Add might_sleep() to down_*() family")
Reported-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: 5.15+ <stable@vger.kernel.org> # 5.15+
2023-06-15 18:05:19 +02:00
..
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-06-15 18:05:19 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:12 +02:00
2018-03-18 19:08:05 +01:00
2019-10-28 22:12:46 +01:00
2020-06-05 13:34:23 +02:00
2020-10-08 18:03:55 +02:00
2019-10-28 22:12:46 +01:00
2023-04-06 20:29:11 +02:00
2021-01-22 15:51:53 +01:00
2020-10-08 18:03:55 +02:00
2023-04-06 20:29:12 +02:00
2021-01-18 16:01:10 +01:00
2019-08-21 00:00:37 +02:00
2019-02-18 11:21:10 +01:00
2018-03-18 19:08:05 +01:00
2020-03-30 14:52:32 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-12-13 22:40:51 +01:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-25 18:37:41 -07:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2022-04-13 20:24:57 +02:00
2023-04-25 18:37:41 -07:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-01-24 11:49:43 +00:00
2021-03-24 14:50:54 +01:00
2020-10-08 18:03:56 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2019-07-04 00:59:43 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2020-03-30 14:52:33 +02:00
2019-04-09 10:05:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-07-09 11:14:45 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2023-04-06 20:29:11 +02:00
2020-10-08 18:03:55 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2019-10-28 22:12:46 +01:00
2021-04-07 19:09:01 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2019-02-24 21:12:01 +01:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2019-04-09 10:08:28 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2021-12-27 17:01:28 +01:00
2019-08-21 00:00:36 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2023-04-25 18:37:41 -07:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2019-04-09 10:08:28 +02:00
2018-05-10 17:18:45 +02:00
2018-03-18 19:08:05 +01:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2019-08-21 00:00:36 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00
2022-10-28 17:28:23 +02:00
2021-01-22 15:51:53 +01:00
2018-08-14 23:49:13 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2023-04-06 20:29:11 +02:00
2019-01-15 18:04:02 +01:00
2023-04-06 20:29:11 +02:00
2018-03-18 19:08:05 +01:00