aboutsummaryrefslogtreecommitdiff
path: root/security/keys/key.c
diff options
context:
space:
mode:
authorLukas Wunner2020-12-07 09:17:17 +0100
committerMark Brown2020-12-07 14:19:01 +0000
commitc7b884561cb5b641f3dbba950094110794119a6d (patch)
tree6b462cfe956dbceaa54f9769b55c21da25450300 /security/keys/key.c
parent234266a5168bbe8220d263e3aa7aa80cf921c483 (diff)
spi: atmel-quadspi: Fix use-after-free on unbind
atmel_qspi_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: 2d30ac5ed633 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver") Signed-off-by: Lukas Wunner <lukas@wunner.de> Cc: <stable@vger.kernel.org> # v5.0+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: <stable@vger.kernel.org> # v5.0+ Cc: Piotr Bugalski <bugalski.piotr@gmail.com> Link: https://lore.kernel.org/r/4b05c65cf6f1ea3251484fe9a00b4c65478a1ae3.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'security/keys/key.c')
0 files changed, 0 insertions, 0 deletions