linux/drivers/dma
Tejun Heo adfa543e73 dmatest: don't use set_freezable_with_signal()
Commit 981ed70d8e (dmatest: make dmatest threads freezable) made
dmatest kthread use set_freezable_with_signal(); however, the
interface is scheduled to be removed in the next merge window.

The problem is that unlike userland tasks there's no default place
which handles signal pending state and it isn't clear who owns and/or
is responsible for clearing TIF_SIGPENDING.  For example, in the
current code, try_to_freeze() clears TIF_SIGPENDING but it isn't sure
whether it actually owns the TIF_SIGPENDING nor is it race-free -
ie. the task may continue to run with TIF_SIGPENDING set after the
freezable section.

Unfortunately, we don't have wait_for_completion_freezable_timeout().
This patch open codes it and uses wait_event_freezable_timeout()
instead and removes timeout reloading - wait_event_freezable_timeout()
won't return across freezing events (currently racy but fix scheduled)
and timer doesn't decrement while the task is in freezer.  Although
this does lose timer-reset-over-freezing, given that timeout is
supposed to be long enough and failure to finish inside is considered
irrecoverable, I don't think this is worth the complexity.

While at it, move completion to outer scope and explain that we're
ignoring dangling pointer problem after timeout.  This should give
slightly better chance at avoiding oops after timeout.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
2011-11-23 09:28:16 -08:00
..
ioat ioat: fix xor_idx_to_desc 2011-08-03 22:25:06 -07:00
ipu Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
ppc4xx Merge branch 'old_next' into next 2011-04-06 11:51:12 +05:30
amba-pl08x.c dmaengine/amba-pl08x: Check txd->llis_va before freeing dma_pool 2011-09-19 15:13:16 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: add wrappers for testing channel state 2011-08-19 18:39:59 +05:30
at_hdmac.c dmaengine: delete redundant chan_id and chancnt initialization in dma drivers 2011-09-20 11:51:33 +05:30
coh901318_lli.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
coh901318_lli.h tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
coh901318.c Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2011-08-01 13:46:37 -10:00
dmaengine.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2011-08-04 16:43:43 -10:00
dmatest.c dmatest: don't use set_freezable_with_signal() 2011-11-23 09:28:16 -08:00
dw_dmac_regs.h dmaengine/dw_dmac: Update maintainer-ship 2011-05-25 18:30:37 +05:30
dw_dmac.c dmaengine: delete redundant chan_id and chancnt initialization in dma drivers 2011-09-20 11:51:33 +05:30
ep93xx_dma.c dmaengine/ep93xx_dma: add module.h include 2011-10-16 13:52:44 +05:30
fsldma.c dt/fsldma: fix build warning caused by of_platform_device changes 2011-04-10 23:34:38 -07:00
fsldma.h fsldma: fix controller lockups 2011-03-11 17:52:36 -08:00
imx-dma.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
imx-sdma.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
intel_mid_dma_regs.h Fix common misspellings 2011-03-31 11:26:23 -03:00
intel_mid_dma.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
iop-adma.c dma: use BUG_ON correctly in iop-adma.c, v4 2011-03-31 11:07:40 +05:30
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: PL330: Update PL330 DMA API driver 2011-09-14 11:10:01 +05:30
Makefile dmaengine: add ep93xx DMA support 2011-06-08 15:10:44 -06:00
mpc512x_dma.c dmaengine: delete redundant chan_id and chancnt initialization in dma drivers 2011-09-20 11:51:33 +05:30
mv_xor.c dma: mv_xor: use resource_size() 2011-07-14 03:32:31 +05:30
mv_xor.h
mxs-dma.c mxs-dma: enable CLKGATE before accessing registers 2011-08-16 18:33:42 +05:30
pch_dma.c pch_dma: Reduce wasting memory 2011-10-12 10:51:24 +05:30
pl330.c Merge branch 'samsung_dma' into next 2011-09-21 11:53:30 +05:30
shdma.c dma: shdma: transfer based runtime PM 2011-09-28 10:07:40 +05:30
shdma.h dma: shdma: transfer based runtime PM 2011-09-28 10:07:40 +05:30
ste_dma40_ll.c dma40: cyclic xfer support 2011-01-30 22:27:21 -08:00
ste_dma40_ll.h dmaengine/ste_dma40: use AMBA PrimeCell helper macros 2011-07-14 04:09:10 +05:30
ste_dma40.c drivers/dma: Add export.h to ste_dma40.c 2011-10-31 19:31:44 -04:00
timb_dma.c dma/timberdale: free_irq() on an error path 2011-10-07 10:23:11 +05:30
TODO dmaengine: remove ste_dma40 from issue_pending TODO 2011-07-14 04:02:08 +05:30
txx9dmac.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2010-05-21 17:05:46 -07:00
txx9dmac.h txx9dmac: implement a private tx_list 2009-09-08 17:53:03 -07:00