usb: max-3421: Prevent corruption of freed memory
The MAX-3421 USB driver remembers the state of the USB toggles for a device/endpoint. To save SPI writes, this was only done when a new device/endpoint was being used. Unfortunately, if the old device was removed, this would cause writes to freed memory. To fix this, a simpler scheme is used. The toggles are read from hardware when a URB is completed, and the toggles are always written to hardware when any URB transaction is started. This will cause a few more SPI transactions, but no causes kernel panics. Fixes: 2d53139f ("Add support for using a MAX3421E chip as a host driver.") Cc: stable <stable@vger.kernel.org> Signed-off-by:Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20210625031456.8632-1-mark.tomlinson@alliedtelesis.co.nz Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
-
mentioned in commit 7da10737
-
mentioned in commit ae3209b9
-
mentioned in commit 065cc24f
-
mentioned in commit bd64825e
-
mentioned in commit c4402152
-
mentioned in commit c3aab765
-
mentioned in commit 50e5aa0d
-
mentioned in commit 48e448d6
-
mentioned in commit 81b72c68
-
mentioned in commit d08e8fde
-
mentioned in commit 25219956
-
mentioned in commit 08836218
-
mentioned in commit 844a57eb
-
mentioned in commit 95b331bb
-
mentioned in commit 383b8847
Please register or sign in to comment