Skip to content
Unverified Commit 530b5aff authored by Sascha Hauer's avatar Sascha Hauer Committed by Mark Brown
Browse files

spi: fsl-dspi: fix use-after-free in remove path



spi_unregister_controller() not only unregisters the controller, but
also frees the controller. This will free the driver data with it, so
we must not access it later dspi_remove().

Solve this by allocating the driver data separately from the SPI
controller.

Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20200923131026.20707-1-s.hauer@pengutronix.de
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b867eef4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment