[PATCH] dmaengine: sun4i: fix unsafe list iteration

Maxime Ripard maxime.ripard at free-electrons.com
Mon Sep 14 13:34:47 PDT 2015


On Sun, Sep 13, 2015 at 05:15:53PM -0300, Emilio López wrote:
> Currently, sun4i_dma_free_contract iterates over lists and frees memory
> as it goes through them, causing reads to recently freed memory to
> be performed. Fix this by using the safe version of the iterator, so
> freed memory is not referenced at all.
> 
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> Signed-off-by: Emilio López <emilio at elopez.com.ar>

Acked-by: Maxime Ripard <maxime.ripard at free-electrons.com>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150914/2f38ad27/attachment.sig>


More information about the linux-arm-kernel mailing list