]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dma: ste_dma40: don't dereference free:d descriptor
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 13 Feb 2014 09:39:01 +0000 (10:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 06:06:29 +0000 (22:06 -0800)
commitaa9d53380e63a462329b54bfb00c9f9d5288cf46
tree0c56944c494641fa33107d7fd86bb9d0475f54b0
parente5b0fd691249908917e96659c03f2bc5869ed249
dma: ste_dma40: don't dereference free:d descriptor

commit e9baa9d9d520fb0e24cca671e430689de2d4a4b2 upstream.

It appears that in the DMA40 driver the DMA tasklet will very
often dereference memory for a descriptor just free:d from the
DMA40 slab. Nothing happens because no other part of the driver
has yet had a chance to claim this memory, but it's really
nasty to dereference free:d memory, so let's check the flag
before the descriptor is free and store it in a bool variable.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/ste_dma40.c