Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f23c0dc authored by Zhenzhong Duan's avatar Zhenzhong Duan Committed by Greg Kroah-Hartman
Browse files

spi: spidev: fix a potential use-after-free in spidev_release()



[ Upstream commit 06096cc6c5a84ced929634b0d79376b94c65a4bd ]

If an spi device is unbounded from the driver before the release
process, there will be an NULL pointer reference when it's
referenced in spi_slave_abort().

Fix it by checking it's already freed before reference.

Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@gmail.com>
Link: https://lore.kernel.org/r/20200618032125.4650-2-zhenzhong.duan@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 010de571
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment