OSDN Git Service

spi: bcm2835aux: remove dangerous uncontrolled read of fifo
authorMartin Sperl <kernel@martin.sperl.org>
Sat, 30 Mar 2019 09:30:59 +0000 (09:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:31:03 +0000 (10:31 +0100)
commitda21b79a983626bd2e4f05cc8522cd625d5abbb9
tree328c82f11ab02ec6f981cf9d4d21bb1b6cb78e0b
parentddf552e7786f4bf9127f68c70a1ad4fa2f7e99a6
spi: bcm2835aux: remove dangerous uncontrolled read of fifo

[ Upstream commit c7de8500fd8ecbb544846dd5f11dca578c3777e1 ]

This read of the fifo is a potential candidate for a race condition
as the spi transfer is not necessarily finished and so can lead to
an early read of the fifo that still misses data.

So it has been removed.

Fixes: 1ea29b39f4c812ec ("spi: bcm2835aux: add bcm2835 auxiliary spi device...")
Suggested-by: Hubert Denkmair <h.denkmair@intence.de>
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-bcm2835aux.c