projects/linux·commit 684265d4

mm/dmapool.c: use TASK_UNINTERRUPTIBLE in dma_pool_alloc()

684265d4 · Andrew Morton <[email protected]> · 2011-01-13 15:47:25 -08:00

As it stands this code will degenerate into a busy-wait if the calling task
has signal_pending().

Cc: Rolf Eike Beer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
684265d4a30f133162f06ddb2e5010608e60e4bb
Parents
84bc227d

Changes

1 files changed · +1 −1

FileStatusAddDelContent
mm/dmapool.cmodified+1−1View file

mm/dmapool.c

View file
diff --git a/mm/dmapool.c b/mm/dmapool.c
index a2f6295..03bf3bb 100644
--- a/mm/dmapool.c
+++ b/mm/dmapool.c
@@ -324,7 +324,7 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
if (mem_flags & __GFP_WAIT) {
DECLARE_WAITQUEUE(wait, current);
- __set_current_state(TASK_INTERRUPTIBLE);
+ __set_current_state(TASK_UNINTERRUPTIBLE);
__add_wait_queue(&pool->waitq, &wait);
spin_unlock_irqrestore(&pool->lock, flags);