Skip to content

Commit

Permalink
mm/dmapool.c: use TASK_UNINTERRUPTIBLE in dma_pool_alloc()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
akpm00 authored and torvalds committed Jan 14, 2011
1 parent 84bc227 commit 684265d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/dmapool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 684265d

Please sign in to comment.