aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorLukas Wunner2020-12-07 09:17:03 +0100
committerMark Brown2020-12-07 14:18:49 +0000
commit6cfd39e212dee2e77a0227ce4e0f55fa06d79f46 (patch)
tree616ba286d0e51b9192d07a91ffeb5fb6ebe0024c /samples
parent8f96c434dfbc85ffa755d6634c8c1cb2233fcf24 (diff)
spi: spi-qcom-qspi: Fix use-after-free on unbind
qcom_qspi_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: f79a158d37c2 ("spi: spi-qcom-qspi: Use OPP API to set clk/perf state") 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: Rajendra Nayak <rnayak@codeaurora.org> Link: https://lore.kernel.org/r/b6d3c4dce571d78a532fd74f27def0d5dc8d8a24.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions