WSL2-Linux-Kernel/drivers/platform/x86
Tejun Heo 8a32c441c1 freezer: implement and use kthread_freezable_should_stop()
Writeback and thinkpad_acpi have been using thaw_process() to prevent
deadlock between the freezer and kthread_stop(); unfortunately, this
is inherently racy - nothing prevents freezing from happening between
thaw_process() and kthread_stop().

This patch implements kthread_freezable_should_stop() which enters
refrigerator if necessary but is guaranteed to return if
kthread_stop() is invoked.  Both thaw_process() users are converted to
use the new function.

Note that this deadlock condition exists for many of freezable
kthreads.  They need to be converted to use the new should_stop or
freezable workqueue.

Tested with synthetic test case.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
2011-11-21 12:32:23 -08:00
..
Kconfig x86 platform drivers: add POWER_SUPPLY to selected drivers for Dell 2011-11-08 12:49:29 -08:00
Makefile Platform: Samsung Q10 backlight driver 2011-08-05 14:46:17 -04:00
acer-wmi.c acer-wmi: replaced the hard coded bitmap by the communication devices bitmap from SMBIOS 2011-10-24 16:52:42 +02:00
acerhdf.c acerhdf.c: spaces in aliased changed to * 2011-08-05 15:21:51 -04:00
asus-laptop.c asus-laptop: Add rfkill support for Pegatron Lucid tablet 2011-10-24 16:52:41 +02:00
asus-nb-wmi.c asus-wmi: add CWAP support and clarify the meaning of WAPF bits 2011-08-05 14:46:04 -04:00
asus-wmi.c platform-drivers-x86: asus-wmi: fix resource leak in asus_wmi_led_exit 2011-10-24 16:52:38 +02:00
asus-wmi.h asus-wmi: add CWAP support and clarify the meaning of WAPF bits 2011-08-05 14:46:04 -04:00
asus_acpi.c asus: Add pr_fmt and convert printks to pr_<level> 2011-05-27 12:35:46 -04:00
classmate-laptop.c backlight: add backlight type 2011-03-22 17:43:59 -07:00
compal-laptop.c drivers/platform/x86: Fix memory leak 2011-07-07 10:39:03 -04:00
dell-laptop.c platform/x86: fix dell-laptop function prototypes 2011-11-17 10:29:02 -02:00
dell-wmi-aio.c dell: Convert printks to pr_<level> 2011-05-27 12:35:47 -04:00
dell-wmi.c dell-wmi: Add keys for Dell XPS L502X 2011-08-05 15:21:47 -04:00
eeepc-laptop.c platform-drivers-x86: eeepc-laptop: fix wrong test for successful registered led_classdev 2011-10-24 16:52:38 +02:00
eeepc-wmi.c asus-wmi: add CWAP support and clarify the meaning of WAPF bits 2011-08-05 14:46:04 -04:00
fujitsu-laptop.c fujitsu-laptop: Convert printks to pr_<level> 2011-05-27 12:35:47 -04:00
hdaps.c hdaps: Convert printks to pr_<level> 2011-05-27 12:35:48 -04:00
hp-wmi.c hp-wmi: fix use after free 2011-07-11 09:52:35 -04:00
hp_accel.c Merge branch 'akpm' (Andrew's incoming) 2011-10-31 17:46:07 -07:00
ibm_rtl.c ibm_rtl: Use pr_fmt and pr_<level> 2011-05-27 12:35:49 -04:00
ideapad-laptop.c ideapad: remove sysfs node for cfg 2011-10-24 16:52:39 +02:00
intel_ips.c x86 driver: fix typo in TDP override enabling 2011-08-05 15:21:49 -04:00
intel_ips.h drm/i915, intel_ips: When i915 loads after IPS, make IPS relink to i915. 2010-12-23 09:51:36 +00:00
intel_menlow.c platform-drivers-x86: intel_menlow: add missing return AE_OK for intel_menlow_register_sensor() 2011-08-05 14:46:12 -04:00
intel_mid_powerbtn.c platform/x86: Simplify intel_mid_powerbtn 2011-05-27 12:36:46 -04:00
intel_mid_thermal.c platform-drivers-x86: intel_mid_thermal: fix memory leak 2011-08-05 14:46:11 -04:00
intel_oaktrail.c platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM 2011-07-07 11:27:17 -04:00
intel_pmic_gpio.c intel_pmic_gpio: Convert printks to pr_<level> 2011-05-27 12:35:50 -04:00
intel_rar_register.c platform-drivers-x86: intel_rar_register: convert to DEFINE_PCI_DEVICE_TABLE 2011-08-05 14:46:14 -04:00
intel_scu_ipc.c x86: fix up files really needing to include module.h 2011-10-31 19:30:36 -04:00
intel_scu_ipcutil.c intel_scu_ipcutil: fix major device number handling 2011-10-24 16:52:39 +02:00
msi-laptop.c msi-laptop: add MSI U270 netbook to module alias and scm list 2011-08-05 14:45:39 -04:00
msi-wmi.c x86: fix up files really needing to include module.h 2011-10-31 19:30:36 -04:00
mxm-wmi.c mxm/wmi: add MXMX interface entry point. 2011-05-09 11:40:38 +10:00
panasonic-laptop.c backlight: add backlight type 2011-03-22 17:43:59 -07:00
samsung-laptop.c Platform: samsung_laptop: add support for X520 machines. 2011-10-24 16:52:40 +02:00
samsung-q10.c platform-drivers-x86: samsung-q10: make dmi_check_callback return 1 2011-08-05 15:21:47 -04:00
sony-laptop.c sony-laptop:irq: Remove IRQF_DISABLED 2011-10-24 16:52:42 +02:00
tc1100-wmi.c tc1100-wmi: Add pr_fmt, use pr_<level> 2011-05-27 12:35:51 -04:00
thinkpad_acpi.c freezer: implement and use kthread_freezable_should_stop() 2011-11-21 12:32:23 -08:00
topstar-laptop.c topstar-latop: ignore 0x82 event 2011-10-24 16:52:37 +02:00
toshiba_acpi.c toshiba_acpi: Initialize brightness in backlight device 2011-10-24 16:52:37 +02:00
toshiba_bluetooth.c toshiba: Convert printks to pr_<level> 2011-05-27 12:35:52 -04:00
wmi.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
xo1-rfkill.c Add OLPC XO-1 rfkill driver 2010-10-21 10:10:44 -04:00
xo15-ebook.c xo15-ebook: Use pr_<level> 2011-05-27 12:35:53 -04:00