RE: [PATCH v2 2/2] dma/ep93xx_dma: prevent ep93xx_dma_tasklet() toreference an empty list

From: H Hartley Sweeten
Date: Mon Nov 28 2011 - 12:33:17 EST


On Saturday, November 26, 2011 3:54 AM, Mika Westerberg wrote:
>
> If dma_terminate_all() is called before the ep93xx_dma_tasklet() gets to run,
> it tries to access an empty ->active list which results following OOPS:

[OOPS snipped...]

> To make the code a bit more robust against things like these, we modify
> ep93xx_dma_get_active() to return NULL in case of empty ->active list and make
> sure that callers handle this correctly.
>
> Reported-by: Rafal Prylowski <prylowski@xxxxxxxxxxx>
> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxx>
> ---
> drivers/dma/ep93xx_dma.c | 60 ++++++++++++++++++++++++++++++++++++---------
> 1 files changed, 48 insertions(+), 12 deletions(-)

Looks good. Thanks.

Acked-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
--
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/