Re: [PATCH 2/2] dma/ep93xx_dma: prevent ep93xx_dma_tasklet() toaccess empty list

From: Mika Westerberg
Date: Thu Nov 24 2011 - 00:47:54 EST


On Wed, Nov 23, 2011 at 04:30:34PM +0530, Vinod Koul wrote:
>
> will you still hit the problem if you do a proper check in tasklet for
> a) if list is empty
> b) if _get_active_desc() returns valid desc
> and the _get_active_desc() returns NULL on not finding active desc

No, with the above the problem goes away.

> The point is by adding a flag you are avoiding the condition hence it is
> working for you whereas on other approach you exit gracefully without
> crashing in all the cases (including potentially uncovered ones)

Ok I see.

I'll prepare a new version where ep93xx_dma_get_active() returns NULL in case
of empty active list, and handle it properly in callers.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/