summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2015-08-26 15:36:01 +0300
committerDmitry Kovalenko <d.kovalenko@samsung.com>2015-08-27 23:42:21 -0700
commite04c84a600316fa3ea39aed77600e328c9ec3764 (patch)
tree2001eefd72b8046e14cd2de07882f6d511050232
parent21956928dc58f77d67558a3305fc8a4e69422d40 (diff)
downloadswap-modules-e04c84a600316fa3ea39aed77600e328c9ec3764.tar.gz
swap-modules-e04c84a600316fa3ea39aed77600e328c9ec3764.tar.bz2
swap-modules-e04c84a600316fa3ea39aed77600e328c9ec3764.zip
[FIX] Use GFP_ATOMIC flag for pl_struct allocation
GFP_KERNEL causes problems since the structure is allocated in atomic context. Change-Id: Ie98b644587385f7d7898fbf6ae68cdbc2256d2e4 Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
-rw-r--r--us_manager/pf/pf_group.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/us_manager/pf/pf_group.c b/us_manager/pf/pf_group.c
index 548fbe06..3303b21b 100644
--- a/us_manager/pf/pf_group.c
+++ b/us_manager/pf/pf_group.c
@@ -61,13 +61,12 @@ static DEFINE_RWLOCK(pfg_list_lock);
/* struct pl_struct */
static struct pl_struct *create_pl_struct(struct sspt_proc *proc)
{
- struct pl_struct *pls = kmalloc(sizeof(*pls), GFP_KERNEL);
+ struct pl_struct *pls = kmalloc(sizeof(*pls), GFP_ATOMIC);
- if (pls == NULL)
- return NULL;
-
- INIT_LIST_HEAD(&pls->list);
- pls->proc = sspt_proc_get(proc);
+ if (pls) {
+ INIT_LIST_HEAD(&pls->list);
+ pls->proc = sspt_proc_get(proc);
+ }
return pls;
}