Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1327717 > unrolled thread

[PATCH] QE: Use GFP_ATOMIC under spin lock

Started byweiyj_lk@163.com
First post2016-02-05 15:00 +0100
Last post2016-02-05 15:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] QE: Use GFP_ATOMIC under spin lock weiyj_lk@163.com - 2016-02-05 15:00 +0100

#1327717 — [PATCH] QE: Use GFP_ATOMIC under spin lock

Fromweiyj_lk@163.com
Date2016-02-05 15:00 +0100
Subject[PATCH] QE: Use GFP_ATOMIC under spin lock
Message-ID<qYP5x-Xo-21@gated-at.bofh.it>
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

The function cpm_muram_alloc_common() is called from several
places, in some of which, such as cpm_muram_alloc(), a lock is
held here, so we should use GFP_ATOMIC when a lock is held.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/soc/fsl/qe/qe_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
index 419fa5b..d774e54 100644
--- a/drivers/soc/fsl/qe/qe_common.c
+++ b/drivers/soc/fsl/qe/qe_common.c
@@ -194,7 +194,7 @@ unsigned long cpm_muram_alloc_common(unsigned long size, genpool_algo_t algo,
 		goto out2;
 	start = start - GENPOOL_OFFSET;
 	memset_io(cpm_muram_addr(start), 0, size);
-	entry = kmalloc(sizeof(*entry), GFP_KERNEL);
+	entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
 	if (!entry)
 		goto out1;
 	entry->start = start;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web