Patch "platform/x86: dell-smbios-wmi: Fix oops on rmmod dell_smbios" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    platform/x86: dell-smbios-wmi: Fix oops on rmmod dell_smbios

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-x86-dell-smbios-wmi-fix-oops-on-rmmod-dell_.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7461e74eb0d1a3a9cd0e4389c0b989de1fd533e2
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Tue May 18 14:50:27 2021 +0200

    platform/x86: dell-smbios-wmi: Fix oops on rmmod dell_smbios
    
    [ Upstream commit 3a53587423d25c87af4b4126a806a0575104b45e ]
    
    init_dell_smbios_wmi() only registers the dell_smbios_wmi_driver on systems
    where the Dell WMI interface is supported. While exit_dell_smbios_wmi()
    unregisters it unconditionally, this leads to the following oops:
    
    [  175.722921] ------------[ cut here ]------------
    [  175.722925] Unexpected driver unregister!
    [  175.722939] WARNING: CPU: 1 PID: 3630 at drivers/base/driver.c:194 driver_unregister+0x38/0x40
    ...
    [  175.723089] Call Trace:
    [  175.723094]  cleanup_module+0x5/0xedd [dell_smbios]
    ...
    [  175.723148] ---[ end trace 064c34e1ad49509d ]---
    
    Make the unregister happen on the same condition the register happens
    to fix this.
    
    Cc: Mario Limonciello <mario.limonciello@xxxxxxxxxxx>
    Fixes: 1a258e670434 ("platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver")
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxxxxxx>
    Reviewed-by: Mark Gross <mgross@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210518125027.21824-1-hdegoede@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/x86/dell-smbios-wmi.c b/drivers/platform/x86/dell-smbios-wmi.c
index cf2229ece9ff..ccccce9b67ef 100644
--- a/drivers/platform/x86/dell-smbios-wmi.c
+++ b/drivers/platform/x86/dell-smbios-wmi.c
@@ -274,7 +274,8 @@ int init_dell_smbios_wmi(void)
 
 void exit_dell_smbios_wmi(void)
 {
-	wmi_driver_unregister(&dell_smbios_wmi_driver);
+	if (wmi_supported)
+		wmi_driver_unregister(&dell_smbios_wmi_driver);
 }
 
 MODULE_ALIAS("wmi:" DELL_WMI_SMBIOS_GUID);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux