spi: spidev: fix a potential use-after-free in spidev_release()
commit 06096cc6 upstream. 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:Zhenzhong Duan <zhenzhong.duan@gmail.com> Link: https://lore.kernel.org/r/20200618032125.4650-2-zhenzhong.duan@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com>
Loading
Please register or sign in to comment