[PATCH] mxcmmc: Internal error: Oops: 17 [#1] ARM from sg->offset

Sascha Hauer s.hauer at pengutronix.de
Fri Jan 24 16:52:50 EST 2014


On Thu, Jan 23, 2014 at 05:01:49PM +0800, Chris Ruehl wrote:
> On Wednesday, January 22, 2014 03:23 PM, Sascha Hauer wrote:
> >On Wed, Jan 22, 2014 at 03:19:48PM +0800, Chris Ruehl wrote:
> >>On Wednesday, January 22, 2014 02:42 PM, Sascha Hauer wrote:
> >>>On Wed, Jan 22, 2014 at 12:32:39PM +0800, Chris Ruehl wrote:
> >>>>Function mxcmci_request() throw an exception on a imx27 cpu.
> >>>>This patch fix the problem by test the pointer before access it.
> >>>>
> >>>>diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> >>>>index f7199c8..8645d6a 100644
> >>>>--- a/drivers/mmc/host/mxcmmc.c
> >>>>+++ b/drivers/mmc/host/mxcmmc.c
> >>>>@@ -347,7 +347,7 @@ static int mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data)
> >>>>  		return 0;
> >>>>  	for_each_sg(data->sg, sg, data->sg_len, i) {
> >>>>-		if (sg->offset & 3 || sg->length & 3 || sg->length < 512) {
> >>>>+		if (sg && (sg->offset & 3 || sg->length & 3 || sg->length < 512)) {
> >>>The question is why sg is NULL. I think this shouldn't happen.
> >>>
> >>>Sascha
> >>>
> >>Thats was my idea too. But had no time to debug it out.
> >>As for_each_sg() iterate over the sg-list may its not set properly
> >>before - In an earlier post
> >>I ask for help but no-one returned so I quick fixed it.  Maybe now
> >>the bell is loud enough ;-)
> >Please try to track it further down. Does this happen every time you are
> >in this function or does it happen only every once in a while? Does it
> >happen in the first iteration of the loop? is it an SDIO card or regular
> >SD card?
> >
> >Sascha
> >
> Sascha,
> 
> there was a fix for a race condition:
> 
> commit 70aa6109597ea6955a93f16430b588b5ee5ba547
> mmc: mxcmmc: fix race conditions for host->req and host->data access
> 
> do you think its possible that the current oops is kind of race?

Could be, yes. I remember problems that the dma completion interrupt and
the data transfer interrupt came in the wrong (or better: unexpected)
order. Maybe this is not completely solved.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-arm mailing list