Bug 196097

Summary: Kernel panic when asus-wireless is unloaded
Product: Drivers Reporter: Dr.Pepper (bitter.taste)
Component: Platform_x86Assignee: drivers_platform_x86 (drivers_platform_x86)
Status: NEW ---    
Severity: normal CC: jprvita
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: All Subsystem:
Regression: No Bisected commit-id:

Description Dr.Pepper 2017-06-16 20:01:58 UTC
The led device is registered using devm_led_classdev_register so that's automatically cleared when the whole device is unregistered, too bad the led subsystem does turn the led off when the led is unregistered and that causes led_state_set to do queue_work on a workqueue that's already been destroyed in asus_wireless_remove.
Adding a devm_led_classdev_unregister before asus_wireless_remove destroys the workqueue fixes the problem, the other asus wmi drivers may suffer from the same problem though, I didn't really check.
Comment 1 João Paulo Rechi Vita 2018-04-07 02:50:33 UTC
I can reproduce this on the Asus X555DG I have here. Expect to see a patch on the platform-drivers-x86 mailing list soon.