Re: [PATCH] EISA aic7770 broken

Marc Zyngier (mzyngier@freesurf.fr)
10 Mar 2003 22:43:48 +0100


>>>>> "Justin" == Justin T Gibbs <gibbs@scsiguy.com> writes:

Justin> This is so close to the beginning of the function, that it
Justin> only makes sense that "ahc" is NULL. Can you instrument both
Justin> ahc_runq_tasklet() and ahc_platform_alloc() to see if it is
Justin> indeed the case that "ahc" is NULL, and to verify that "ahc"
Justin> was valid when we registered the tasklet?

It's a little bit more complicated...

The thing crashes in the TAILQ_REMOVE macro, in ahc_runq_tasklet :

TAILQ_REMOVE(&ahc->platform_data->device_runq, dev, links);

I tracked it down to the last line of TAILQ_REMOVE :

#define TAILQ_REMOVE(head, elm, field) do { \
if ((TAILQ_NEXT((elm), field)) != NULL) \
TAILQ_NEXT((elm), field)->field.tqe_prev = \
(elm)->field.tqe_prev; \
else \
(head)->tqh_last = (elm)->field.tqe_prev; \
*(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
\ It crashes here
} while (0)

The thing is, if I put enough printks before the macro, it slows the
thing down (9600 bauds serial console effet, maybe), and the machine
comes up.

So it looks like a race of some sort... Concurent tasklets effect ?

Any idea ?

M.

-- 
Places change, faces change. Life is so very strange.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/