浏览代码

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

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

Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton 14 年之前
父节点
当前提交
684265d4a3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mm/dmapool.c

+ 1 - 1
mm/dmapool.c

@@ -324,7 +324,7 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
 		if (mem_flags & __GFP_WAIT) {
 		if (mem_flags & __GFP_WAIT) {
 			DECLARE_WAITQUEUE(wait, current);
 			DECLARE_WAITQUEUE(wait, current);
 
 
-			__set_current_state(TASK_INTERRUPTIBLE);
+			__set_current_state(TASK_UNINTERRUPTIBLE);
 			__add_wait_queue(&pool->waitq, &wait);
 			__add_wait_queue(&pool->waitq, &wait);
 			spin_unlock_irqrestore(&pool->lock, flags);
 			spin_unlock_irqrestore(&pool->lock, flags);