From: Anatolij Gustschin Date: Mon, 8 Apr 2013 21:28:05 +0000 (+0200) Subject: mmc: mxcmmc: fix race conditions for host->req and host->data access X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~41^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70aa6109597ea6955a93f16430b588b5ee5ba547;p=pandora-kernel.git 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 Acked-by: Sascha Hauer Signed-off-by: Chris Ball --- Reading git-diff-tree failed