From 4b9c049fb1df653dc71c2562e9c95440e6b92254 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Jun 2020 14:49:49 +0200 Subject: [PATCH] 5.6-stable patches added patches: platform-x86-sony-laptop-make-resuming-thermal-profile-safer.patch --- ...-make-resuming-thermal-profile-safer.patch | 39 +++++++++++++++++++ queue-5.6/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 queue-5.6/platform-x86-sony-laptop-make-resuming-thermal-profile-safer.patch diff --git a/queue-5.6/platform-x86-sony-laptop-make-resuming-thermal-profile-safer.patch b/queue-5.6/platform-x86-sony-laptop-make-resuming-thermal-profile-safer.patch new file mode 100644 index 00000000000..455b309c117 --- /dev/null +++ b/queue-5.6/platform-x86-sony-laptop-make-resuming-thermal-profile-safer.patch @@ -0,0 +1,39 @@ +From 476d60b1b4c8a2b14a53ef9b772058f35e604661 Mon Sep 17 00:00:00 2001 +From: Mattia Dongili +Date: Fri, 8 May 2020 09:14:05 +0900 +Subject: platform/x86: sony-laptop: Make resuming thermal profile safer + +From: Mattia Dongili + +commit 476d60b1b4c8a2b14a53ef9b772058f35e604661 upstream. + +The thermal handle object may fail initialization when the module is +loaded in the first place. Avoid attempting to use it on resume then. + +Fixes: 6d232b29cfce ("ACPICA: Dispatcher: always generate buffer objects for ASL create_field() operator") +Reported-by: Dominik Mierzejewski +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207491 +Signed-off-by: Mattia Dongili +Signed-off-by: Andy Shevchenko +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/sony-laptop.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/platform/x86/sony-laptop.c ++++ b/drivers/platform/x86/sony-laptop.c +@@ -2288,7 +2288,12 @@ static void sony_nc_thermal_cleanup(stru + #ifdef CONFIG_PM_SLEEP + static void sony_nc_thermal_resume(void) + { +- unsigned int status = sony_nc_thermal_mode_get(); ++ int status; ++ ++ if (!th_handle) ++ return; ++ ++ status = sony_nc_thermal_mode_get(); + + if (status != th_handle->mode) + sony_nc_thermal_mode_set(th_handle->mode); diff --git a/queue-5.6/series b/queue-5.6/series index 4f0a22ca4cb..319416ad588 100644 --- a/queue-5.6/series +++ b/queue-5.6/series @@ -156,3 +156,4 @@ mmc-sdio-fix-several-potential-memory-leaks-in-mmc_sdio_init_card.patch block-floppy-fix-contended-case-in-floppy_queue_rq.patch xen-pvcalls-back-test-for-errors-when-calling-backend_connect.patch platform-x86-sony-laptop-snc-calls-should-handle-buffer-types.patch +platform-x86-sony-laptop-make-resuming-thermal-profile-safer.patch -- 2.47.3