Bug 196097 - Kernel panic when asus-wireless is unloaded
Summary: Kernel panic when asus-wireless is unloaded
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
Depends on:
Reported: 2017-06-16 20:01 UTC by Dr.Pepper
Modified: 2018-04-07 02:50 UTC (History)
1 user (show)

See Also:
Kernel Version: All
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.

Note You need to log in before you can comment on or make changes to this bug.