summaryrefslogtreecommitdiff
path: root/net/bluetooth/cmtp
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2020-12-07 09:17:04 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-03 08:22:06 +0200
commitfd047a839f0f1d0af99785c47c253804caefbf38 (patch)
tree53164d63c33a92e85221d4c47d850847f028a8df /net/bluetooth/cmtp
parent62bb2c7f2411a0045c24831f11ecacfc35610815 (diff)
spi: spi-sh: Fix use-after-free on unbind
commit e77df3eca12be4b17f13cf9f215cff248c57d98f upstream. spi_sh_remove() accesses the driver's private data after calling spi_unregister_master() even though that function releases the last reference on the spi_master 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: 680c1305e259 ("spi/spi_sh: use spi_unregister_master instead of spi_master_put in remove path") Signed-off-by: Lukas Wunner <lukas@wunner.de> Cc: <stable@vger.kernel.org> # v3.0+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: <stable@vger.kernel.org> # v3.0+ Cc: Axel Lin <axel.lin@ingics.com> Link: https://lore.kernel.org/r/6d97628b536baf01d5e3e39db61108f84d44c8b2.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown <broonie@kernel.org> [lukas: backport to v4.4.270] Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/bluetooth/cmtp')
0 files changed, 0 insertions, 0 deletions