diff options
author | Anatolij Gustschin <agust@denx.de> | 2013-04-09 01:28:05 +0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-04-12 23:13:13 +0400 |
commit | 70aa6109597ea6955a93f16430b588b5ee5ba547 (patch) | |
tree | e56a0940ff8fb9f27878466b6ed2d8692f93ca95 /fs/libfs.c | |
parent | 7ff747c45908abb4fb894b21a8752a3e48acf02b (diff) | |
download | linux-70aa6109597ea6955a93f16430b588b5ee5ba547.tar.xz |
mmc: mxcmmc: fix race conditions for host->req and host->data access
mxcmci_dma_callback() is invoked by DMA drivers in soft-irq
context and can be interrupted by the mxcmci_irq() interrupt
which can finish the mmc request or data transfer and set
host->req or host->data pointers to NULL. Then mxcmci_data_done()
crashes with a null pointer dereferences. Protect all accesses
to host->req and host->data by spin locks.
Also check host->data pointer in mxcmci_watchdog() before
dereferencing it.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'fs/libfs.c')
0 files changed, 0 insertions, 0 deletions