summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-mxic.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2020-12-07 09:17:06 +0100
committerMark Brown <broonie@kernel.org>2020-12-07 14:18:51 +0000
commit393f981ca5f797b58b882d42b7621fb6e43c7f5b (patch)
tree8d7780043edf4a92f614af92ff1c577685bf0d7e /drivers/spi/spi-mxic.c
parent5626308bb94d9f930aa5f7c77327df4c6daa7759 (diff)
downloadlwn-393f981ca5f797b58b882d42b7621fb6e43c7f5b.tar.gz
lwn-393f981ca5f797b58b882d42b7621fb6e43c7f5b.zip
spi: rpc-if: Fix use-after-free on unbind
rpcif_spi_remove() accesses the driver's private data after calling spi_unregister_controller() even though that function releases the last reference on the spi_controller and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound. Fixes: eb8d6d464a27 ("spi: add Renesas RPC-IF driver") Signed-off-by: Lukas Wunner <lukas@wunner.de> Cc: <stable@vger.kernel.org> # v5.9+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: <stable@vger.kernel.org> # v5.9+ Cc: Sergei Shtylyov <s.shtylyov@omprussia.ru> Link: https://lore.kernel.org/r/c5da472c28021da2f6517441685cef033d40b140.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mxic.c')
0 files changed, 0 insertions, 0 deletions