Fix null pointer dereference in bcm2835 MMC driver, Minor updates
This commit is contained in:
parent
d9590581bc
commit
b55a6deb27
@ -1 +0,0 @@
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
@ -1 +1 @@
|
||||
CONFIG_RTC_DRV_OMAP=y
|
||||
CONFIG_RTC_DRV_OMAP=m
|
||||
|
@ -1891,3 +1891,42 @@ index c309633..972f14d 100644
|
||||
+ status = "okay";
|
||||
+ bus-width = <4>;
|
||||
+};
|
||||
From patchwork Sat Mar 25 13:17:00 2017
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: mmc: bcm2835: Fix possible NULL ptr dereference in bcm2835_request
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
X-Patchwork-Id: 9644591
|
||||
Message-Id: <1490447820-751-1-git-send-email-stefan.wahren@i2se.com>
|
||||
To: Ulf Hansson <ulf.hansson@linaro.org>, Eric Anholt <eric@anholt.net>,
|
||||
Gerd Hoffmann <kraxel@redhat.com>
|
||||
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
|
||||
Dan Carpenter <dan.carpenter@oracle.com>,
|
||||
linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
|
||||
Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Sat, 25 Mar 2017 13:17:00 +0000
|
||||
|
||||
This fixes a NULL pointer dereference in case of a MMC request with a
|
||||
set block count command and no data.
|
||||
|
||||
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
drivers/mmc/host/bcm2835.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
|
||||
index 7d1b0db..1f343a4 100644
|
||||
--- a/drivers/mmc/host/bcm2835.c
|
||||
+++ b/drivers/mmc/host/bcm2835.c
|
||||
@@ -1200,7 +1200,8 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
||||
return;
|
||||
}
|
||||
|
||||
- host->use_sbc = !!mrq->sbc && (host->mrq->data->flags & MMC_DATA_READ);
|
||||
+ host->use_sbc = !!mrq->sbc && host->mrq->data &&
|
||||
+ (host->mrq->data->flags & MMC_DATA_READ);
|
||||
if (host->use_sbc) {
|
||||
if (bcm2835_send_command(host, mrq->sbc)) {
|
||||
if (!host->use_busy)
|
||||
|
@ -3081,7 +3081,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -3060,7 +3060,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -3316,7 +3316,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
@ -4744,7 +4743,7 @@ CONFIG_RTC_DRV_MC13XXX=m
|
||||
CONFIG_RTC_DRV_MSM6242=m
|
||||
CONFIG_RTC_DRV_MV=m
|
||||
CONFIG_RTC_DRV_MXC=m
|
||||
CONFIG_RTC_DRV_OMAP=y
|
||||
CONFIG_RTC_DRV_OMAP=m
|
||||
CONFIG_RTC_DRV_PALMAS=m
|
||||
CONFIG_RTC_DRV_PCF2123=m
|
||||
CONFIG_RTC_DRV_PCF2127=m
|
||||
|
@ -3173,7 +3173,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -3152,7 +3152,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -3295,7 +3295,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
@ -4722,7 +4721,7 @@ CONFIG_RTC_DRV_MC13XXX=m
|
||||
CONFIG_RTC_DRV_MSM6242=m
|
||||
CONFIG_RTC_DRV_MV=m
|
||||
CONFIG_RTC_DRV_MXC=m
|
||||
CONFIG_RTC_DRV_OMAP=y
|
||||
CONFIG_RTC_DRV_OMAP=m
|
||||
CONFIG_RTC_DRV_PALMAS=m
|
||||
CONFIG_RTC_DRV_PCF2123=m
|
||||
CONFIG_RTC_DRV_PCF2127=m
|
||||
|
@ -1801,8 +1801,6 @@ CONFIG_I2C_PARPORT=m
|
||||
CONFIG_I2C_PCA_PLATFORM=m
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
CONFIG_I2C_POWERMAC=m
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
# CONFIG_I2C_RK3X is not set
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_SI470X=m
|
||||
@ -2867,7 +2865,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -1783,8 +1783,6 @@ CONFIG_I2C_PARPORT=m
|
||||
CONFIG_I2C_PCA_PLATFORM=m
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
CONFIG_I2C_POWERMAC=m
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
# CONFIG_I2C_RK3X is not set
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_SI470X=m
|
||||
@ -2845,7 +2843,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -1753,8 +1753,6 @@ CONFIG_I2C_PARPORT_LIGHT=m
|
||||
CONFIG_I2C_PARPORT=m
|
||||
CONFIG_I2C_PCA_PLATFORM=m
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
# CONFIG_I2C_RK3X is not set
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_SI470X=m
|
||||
@ -2812,7 +2810,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -1735,8 +1735,6 @@ CONFIG_I2C_PARPORT_LIGHT=m
|
||||
CONFIG_I2C_PARPORT=m
|
||||
CONFIG_I2C_PCA_PLATFORM=m
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
# CONFIG_I2C_RK3X is not set
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_SI470X=m
|
||||
@ -2790,7 +2788,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -1752,8 +1752,6 @@ CONFIG_I2C_PARPORT_LIGHT=m
|
||||
CONFIG_I2C_PARPORT=m
|
||||
CONFIG_I2C_PCA_PLATFORM=m
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
# CONFIG_I2C_RK3X is not set
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_SI470X=m
|
||||
@ -2811,7 +2809,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -1734,8 +1734,6 @@ CONFIG_I2C_PARPORT_LIGHT=m
|
||||
CONFIG_I2C_PARPORT=m
|
||||
CONFIG_I2C_PCA_PLATFORM=m
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
# CONFIG_I2C_RK3X is not set
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_SI470X=m
|
||||
@ -2789,7 +2787,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -1708,8 +1708,6 @@ CONFIG_I2C_MUX_MLXCPLD=m
|
||||
# CONFIG_I2C_PARPORT_LIGHT is not set
|
||||
# CONFIG_I2C_PCA_PLATFORM is not set
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
# CONFIG_I2C_RK3X is not set
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_SI470X=m
|
||||
@ -2750,7 +2748,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -1690,8 +1690,6 @@ CONFIG_I2C_MUX_MLXCPLD=m
|
||||
# CONFIG_I2C_PARPORT_LIGHT is not set
|
||||
# CONFIG_I2C_PCA_PLATFORM is not set
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
# CONFIG_I2C_RK3X is not set
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_SI470X=m
|
||||
@ -2728,7 +2726,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y
|
||||
CONFIG_MOUSE_PS2_ELANTECH=y
|
||||
CONFIG_MOUSE_PS2_SENTELIC=y
|
||||
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
|
||||
# CONFIG_MOUSE_PS2_VMMOUSE is not set
|
||||
CONFIG_MOUSE_PS2=y
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_SYNAPTICS_I2C=m
|
||||
|
@ -2172,6 +2172,10 @@ fi
|
||||
#
|
||||
#
|
||||
%changelog
|
||||
* Sun Mar 26 2017 Peter Robinson <pbrobinson@fedoraproject.org>
|
||||
- Fix null pointer dereference in bcm2835 MMC driver
|
||||
- Minor ARM updates
|
||||
|
||||
* Fri Mar 24 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc3.git2.1
|
||||
- Linux v4.11-rc3-161-gebe6482
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user