Unplugging Logitech USB Receivers Has Been Causing The Linux Kernel To Crash

Queued up this week as part of the HID subsystem fixes ahead of today's Linux 6.6-rc6 kernel test release has been a rather embarrassing bug: unplugging Logitech USB receivers has for the past several months been causing the Linux kernel to crash. After a number of bug reports around this issue from unplugging Logitech keyboard/mice receivers to simply switching away on a USB switch with the device(s) attached, the Linux 6.6-rc6 kernel is carrying the fix and it's also marked for back-porting to existing stable Linux kernel series.

Red Hat's Hans de Goede continues to do wonders for fixing up and improving Linux desktop/laptop hardware support. He took on to dealing with this Logitech USB receiver disconnect bug. That followed a number of different Red Hat bug reports over the summer: USB disconnect causes kernel crash , power_supply_uevent on USB leads to page_fault_oops , kernel module hid_logitech_dj causes crash and broken USB , and Logitech unify receiver not working properly , among others.


As explained in the patch fixing the kernel crash on receiver USB disconnect, there are four time-of-check vs. time-of-use races that needed to be addressed.

The fix was merged as part of this week's HID fixes for Linux 6.6-rc6 and in turn will be back-ported to the Linux stable series over the coming days. In the meantime, don't unplug your Logitech USB receiver if you are on a recent Linux kernel version to avoid the possible kernel crash.