[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1336655975-15729-1-git-send-email-m.szyprowski@samsung.com>
Date: Thu, 10 May 2012 15:19:35 +0200
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-media@...r.kernel.org, linux-mm@...ck.org,
linaro-mm-sig@...ts.linaro.org
Cc: Michal Nazarewicz <mina86@...a86.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Russell King <linux@....linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Daniel Walker <dwalker@...eaurora.org>,
Mel Gorman <mel@....ul.ie>, Arnd Bergmann <arnd@...db.de>,
Jesse Barker <jesse.barker@...aro.org>,
Jonathan Corbet <corbet@....net>,
Chunsang Jeong <chunsang.jeong@...aro.org>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Benjamin Gaignard <benjamin.gaignard@...aro.org>,
Rob Clark <rob.clark@...aro.org>,
Ohad Ben-Cohen <ohad@...ery.com>,
Sandeep Patil <psandeep.s@...il.com>
Subject: [PATCH] drivers: cma: don't fail if migration returns -EAGAIN
alloc_contig_range() function might return -EAGAIN if migrate_pages() call
fails for some temporarily locked pages. Such case should not be fatal
to dma_alloc_from_contiguous(), which should retry allocation like in case
of -EBUSY error.
Reported-by: Haojian Zhuang <haojian.zhuang@...il.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
---
drivers/base/dma-contiguous.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c
index 78efb03..e46e2fb 100644
--- a/drivers/base/dma-contiguous.c
+++ b/drivers/base/dma-contiguous.c
@@ -346,7 +346,7 @@ struct page *dma_alloc_from_contiguous(struct device *dev, int count,
if (ret == 0) {
bitmap_set(cma->bitmap, pageno, count);
break;
- } else if (ret != -EBUSY) {
+ } else if (ret != -EBUSY && ret != -EAGAIN) {
goto error;
}
pr_debug("%s(): memory range at %p is busy, retrying\n",
--
1.7.1.569.g6f426
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists