From 4b786458ed99eae9e9d9984a1624a79e9bf6cebb Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Mon, 25 May 2015 10:13:10 +0000 Subject: [PATCH] spi: restore rx/tx_buf in case of unset CONFIG_HAS_DMA The case where spi_master sets the flags SPI_MASTER_MUST_RX/TX while CONFIG_HAS_DMA is unset (which is unlikley) together with a driver that reuses spi_messages with rx/tx_buff set to NULL, can result in: * data disclosure over the SPI (for tx_buf == NULL) * memory corruption (for rx_buf == NULL) This happenes when dummy_rx/dummy_tx are changing address due to krealloc or free and an allocation of the memory by a different part of the kernel. Signed-off-by: Martin Sperl Signed-off-by: Mark Brown --- Reading git-format-patch failed