linux/drivers/dma
Javi Merino fdec53d520 DMA: PL330: Fix racy mutex unlock
pl330_update() stores a pointer to the thrd->req that finished, which
contains a pointer to the corresponding pl330_req.  This is done with
the pl330_lock held.  Then, it iterates through the req_done list,
calling the callback for each of the requests that are done.  The
problem is that the driver releases the lock before calling the
callback for each of the callbacks.  pl330_submit_req() running in
another processor can then acquire the lock and insert another request
in one of the thrd->req that hasn't been processed yet, replacing the
pointer to pl330_req there.  When the callback returns in
pl330_update() and the next rqdone is popped from the list, it
dereferences the pl330_req pointer to the just scheduled pl330_req,
instead of the one that has finished, calling pl330 with the wrong r.

This patch fixes this by storing the pointer to pl330_req directly in
the list.

Signed-off-by: Javi Merino <javi.merino@arm.com>
Cc: Jassi Brar <jaswinder.singh@linaro.org>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-06-14 08:39:52 +05:30
..
ioat dmaengine-fixes for 3.4-rc3 2012-04-10 15:30:16 -07:00
ipu dmaengine i.MX ipu: clk_prepare/unprepare clock 2012-04-25 17:03:43 +02:00
ppc4xx dmaengine: ensure all DMA engine drivers initialize their cookies 2012-03-13 11:37:42 +05:30
amba-pl08x.c dmaengine: Use dma_sg_len(sg) instead of sg->length 2012-05-11 12:04:38 +05:30
at_hdmac.c dmaengine: at_hdmac: take maxburst from slave configuration 2012-05-15 08:47:18 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: take maxburst from slave configuration 2012-05-15 08:47:18 +05:30
coh901318.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-05-25 09:31:59 -07:00
coh901318_lli.c dmaengine: Use sg_dma_address instead of sg_phys 2012-05-11 12:04:38 +05:30
coh901318_lli.h dmaengine: move drivers to dma_transfer_direction 2011-10-27 20:53:43 +05:30
dmaengine.c dmaengine-fixes for 3.4-rc3 2012-04-10 15:30:16 -07:00
dmaengine.h dmaengine: consolidate initialization of cookies 2012-03-13 11:37:22 +05:30
dmatest.c dmaengine: fix missing 'cnt' in ?: in dmatest 2012-01-23 11:43:18 -08:00
dw_dmac.c dmaengine: Use sg_dma_address instead of sg_phys 2012-05-11 12:04:38 +05:30
dw_dmac_regs.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
ep93xx_dma.c arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00
fsldma.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
fsldma.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
imx-dma.c dmaengine: Use dma_sg_len(sg) instead of sg->length 2012-05-11 12:04:38 +05:30
imx-sdma.c dma: imx-sdma: buf_tail should be initialize in prepare function 2012-06-07 13:48:42 +05:30
intel_mid_dma.c dmaengine: Use dma_sg_len(sg) instead of sg->length 2012-05-11 12:04:38 +05:30
intel_mid_dma_regs.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
iop-adma.c dmaengine-fixes for 3.4-rc3 2012-04-10 15:30:16 -07:00
iovlock.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig dma: mxs-dma: use global stmp_device functionality 2012-05-12 13:32:17 +08:00
Makefile DMA: sa11x0: add SA-11x0 DMA driver 2012-03-07 11:32:21 +00:00
mpc512x_dma.c dmaengine: consolidate initialization of cookies 2012-03-13 11:37:22 +05:30
mv_xor.c ARM: Orion: XOR: Add support for clk 2012-05-08 16:34:02 -07:00
mv_xor.h ARM: Orion: XOR: Add support for clk 2012-05-08 16:34:02 -07:00
mxs-dma.c arm-soc: device tree conversions, part 2 2012-05-26 12:57:47 -07:00
pch_dma.c dmaengine: Use sg_dma_address instead of sg_phys 2012-05-11 12:04:38 +05:30
pl330.c DMA: PL330: Fix racy mutex unlock 2012-06-14 08:39:52 +05:30
sa11x0-dma.c ARM: sa11x0: fix build errors from DMA engine API updates 2012-03-30 11:46:20 +01:00
shdma.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
shdma.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
sirf-dma.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
ste_dma40.c dmaengine: Use dma_sg_len(sg) instead of sg->length 2012-05-11 12:04:38 +05:30
ste_dma40_ll.c dma40: cyclic xfer support 2011-01-30 22:27:21 -08:00
ste_dma40_ll.h dma40: Improve the logic of stopping logical chan 2012-04-23 17:56:17 +05:30
timb_dma.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
TODO dmaengine: remove ste_dma40 from issue_pending TODO 2011-07-14 04:02:08 +05:30
txx9dmac.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
txx9dmac.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30