In the Linux kernel, the following vulnerability has been resolved: spi: virtio: move teardown to .remove() The .remove() callback is not marked as optional for a virtio_driver, and thus a missing one is a bug. Moreover, the virtio framework expects a driver to reset the device it controls during teardown and explicitly checks for this reading the device status and WARNing in case it is still running. Any devm cleanup action gets however called after that check, leading to the WARN_ON condition to always be true for spi-virtio; thus, an empty remove() is not an option. Move the cleanup actions to the .remove() callback of the driver and adapt the surrounding code to the new behavior.
https://git.kernel.org/stable/c/feaaed040262e1a74c9e3cff91fd9d27849a4661
https://git.kernel.org/stable/c/9060f5ba658c9b0a7332be55b3d8abfc2b08618b
https://git.kernel.org/stable/c/0f453d221d53bbe5ce00c2f80c9948f5570cb55d