[<prev] [next>] [day] [month] [year] [list]
Message-id: <1389948438-26437-1-git-send-email-m.szyprowski@samsung.com>
Date: Fri, 17 Jan 2014 09:47:18 +0100
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: linux-kernel@...r.kernel.org, linux-cris-kernel@...s.com
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
Mikael Starvik <starvik@...s.com>,
Jesper Nilsson <jesper.nilsson@...s.com>
Subject: [PATCH] cris: cryptocop: fix GFP_ATOMIC macro usage
GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other
flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an
atomic allocation, the code must test __GFP_WAIT flag presence.
Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
---
arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index 877da19..7f2e60a 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -306,7 +306,7 @@ static void free_cdesc(struct cryptocop_dma_desc *cdesc)
static struct cryptocop_dma_desc *alloc_cdesc(int alloc_flag)
{
- int use_pool = (alloc_flag & GFP_ATOMIC) ? 1 : 0;
+ int use_pool = (alloc_flag & __GFP_WAIT) ? 0 : 1;
struct cryptocop_dma_desc *cdesc;
if (use_pool) {
--
1.7.9.5
--
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